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

Include recurring profile reference in reauthorize requests #118

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

Conversation

luukveenis
Copy link
Member

The way this is currently implemented, it will use the shopper reference to find any potential recurring payment contracts and automatically use the latest one. This can cause problems because the shopper reference we use is either the user_id if one exists and otherwise the order number. If an order is initially placed as a guest checkout and later associated to a user, the recurring profile lookup will fail.

We already store the recurring profile reference on the payment source (Spree::CreditCard), so we should just pass in the one we have on file explicitly.

Luuk Veenis added 2 commits August 14, 2017 14:24
`render :text` is no longer supported as of Rails 5.1, so this will try
to render a notify.html.erb view which doesn't exist. Render plain has
been supported since Rails 4.2, so this shouldn't cause any
compatibility issues.
The way this is currently implemented, it will use the shopper reference
to find any potential recurring payment contracts and automatically use
the latest one. This can potentially cause problems and we should just
use the profile reference we have stored on the credit card.
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.

2 participants