Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks & Fixes #10

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Tweaks & Fixes #10

wants to merge 26 commits into from

Conversation

buddhi-desilva
Copy link
Contributor

  • Catches the transaction even if the user didn't go back to the store through the paypal/confirm url. I think it can be improved than that.
  • Tested with PayPal + SSL + OpenSSL encryption of the button data: Payments Works ;-)
  • Added some code comments for OpenSSL encryption and updated the README.md

TODO/IDEAS: If there's a possibility, may be we can make the payment_notifications a subclass of checkout and DRY it a bit by removing the redundant/borrowed code from checkout :-)

In case user doesn't come to the site through checkout/confirm URL, The
method in base controller checks for the existing orders and reset the
cart if the payment has been received.
* Removed the redundant logic that has been moved to base_controller
* Removed the logging info
* Slimmed down the code
* It used to work before and now it's throwing an error saying
uninitialized constant. Specified the classname explicitly (even though
it may not be necessary).
TODO: Make it generic and flexible
Fixes the issue (may be temporarily) by checking for line items..
Cart get emptied if a promo code with higher value than the cart value
get entered. Now checking the order state instead. Need sandbox testing.
* PayPal discount calculation
* Not so great workaround for discount > item_total
Preferences can be entered through Spree > Admin > Configurations
* Mistakenly reverted the added routes. Committing again...
* Added attr_accessible to PaymentNotification (fix no mass assignment
error)
* Updated the borrowed medthods from checkout controller
* Removed unwanted code
* The check_current_order method has no use when the spree receives
payment confirmation from PayPal. Need find a different route to show
the payment confirmation to the user.
* Cannot cycle through order.next and now payment/order status been set
directly
* Remove unwanted code
* Some of the code extracted from Spree_PayPal_Express gem
* If the user visits a different URL after payment other than use the
confirm payment url, the user won't get notified on payment. Need a
fix. Currently commented out since old code is obsolete.
* Order number included with success URL
* Success URL is a dynamically set URL based on Site URL.
* If the user is logged in and paid user will be taken to view order
screen. Otherwise to the root url with an appropriate message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant