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

PayPal siliently switches to *authorize* when using repeat payments #6

Closed
judgej opened this issue Nov 24, 2018 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@judgej
Copy link
Member

judgej commented Nov 24, 2018

This is about functionality that is not clear, an d can lead to some lost transactions. The fix is to thrown an exception for certain requested PayPal actions, forcing the site developer to be more explicit with their settings. That's the summary, details follow.

Datatrans supports the ability to capture a credit card token that can be used for multiple payments such as subscriptions. This works across all the credit card types, but works differently for PayPal. For all other credit card types, a card reference can be captured when issuing either an authorize or a purchase. When doing an authorize, the payment must be captured as a separate action. When doing a purchase the capture is build in.

For credit cards, it does not matter whether doing an authorize or a purchase, the card reference can be captured in either case. For PayPal, card references cannot be captured, but an "order reference" can. The order reference is used in the same way as a card reference, so the functional equivalent exists for PayPal.

However, when PayPal is asked to capture an order reference, PayPal will switch to authorize-only mode, even when asked to perform a purchase. So invisible to the merchant shop, no capture is performed, even if the shop asks for it. The shop is then told that everything worked fine. Some developers may not be aware of this, and even just documenting it can remain a risk.

So the solution is to disable card-reference capture just for PayPal and the purchase method; if chosen then an exception will be thrown. Capturing a card reference for PayPal when using the authorize method will work as before (no exception will be thrown).

@judgej judgej self-assigned this Nov 24, 2018
@judgej judgej added the enhancement New feature or request label Nov 24, 2018
@judgej judgej changed the title PayPal only supports purchase when using repeat payments PayPal only supports *authorize* when using repeat payments Nov 24, 2018
@judgej judgej changed the title PayPal only supports *authorize* when using repeat payments PayPal siliently switches to *authorize* when using repeat payments Nov 24, 2018
@judgej judgej added the next release Fixed for next release label Dec 2, 2018
@judgej
Copy link
Member Author

judgej commented Jan 5, 2019

This was released in version 3.0.5

@judgej judgej closed this as completed Jan 5, 2019
@judgej judgej removed the next release Fixed for next release label Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant