Closed wsmoak closed 7 years ago
Based on discussion in https://github.com/activemerchant/active_merchant/pull/1873, 'purchase' needs to support both
It appears that /payments/:id/authorize
takes either a token or the full card info, so this should be possible... http://tech.quickpay.net/api/services/?scope=merchant#POST-payments--id-authorize---format-
I've got a fix working for this, but I'm having to dig through the response to find the payment id I need, when based on the existing code I think it should be in 'r.authorization'.
https://github.com/activemerchant/active_merchant/compare/master...chargify:quickpay_recurring
Could someone take a look? Or should I go ahead and open a PR since there is now code to discuss? Thanks! /cc @duff
Looks like they don't make it super cinchy to run recurring purchases against a stored card. Tokens, cards, references, auths, captures. Whew! Pretty great that you've got a remote test demonstrating the issue.
👍 for a PR
Closed with ed4ed2d03837a3a7db6a22fc37861c22f3779c90. Thanks for opening up this issue @wsmoak!
As I commented on https://github.com/activemerchant/active_merchant/pull/1873, the current implementation of 'store' for QuickPay v10 returns a single-use token.
The existing test demonstrates that you can store and then use it to make a purchase, but if you attempt a second purchase, as for a subscription renewal, it will fail because the token has already been used.
I tested this with the API directly with curl and checked with QuickPay support to confirm that...
Storing a card is:
Now the card is stored and can be reused, so
Creating a payment is:
I'll branch and see if I can re-work this. Let me know if anyone else is already working on it or if you have any comments/suggestions!