Join GitHub today
Credit card authorization fails after first failed attempt on account #2652
I've written pages on tracking this issue in spree-users...
I'm using 1-3-stable
Attempting to configure a payment method to use the Authorize.Net API at EProcessing Network(EPN). Using non-CIM Authorize.Net gateway.
If a new account is created, one payment can be processed without issue.
Subsequent attempts to process a transaction on the same account fails, Spree redirects back to the payment step with a flash error "Payment could not be processed, please check the details you entered"
I've noted that somewhere, some invalid card info is getting persisted as I have seen it on the confirm page when I force a confirm step. I've also confirmed that on failed attempts, the card number is zero length on the processing end of the transaction.
Huge show stopper here. Please let me know what I need to do to help fix this.
More info to help recreate this:
Create a new spree store with no added extensions
To prove the problem, create a new user account and on first payment attempt, use a valid number. It will succeed.
I'm able to duplicate this behavior using the Bogus gateway. This is apparently related to the other issues I mentioned with Bogus gateway in spree-user.
Same deal. If you enter an invalid card number the first attempt on the account, subsequent attempts will fail.
Other hint that I have mentioned in spree-user is that in the confirm screen, if you look at the payment information, the last 4 digits displayed for the card never change after the first attempt.
Hi again @rterbush.
This issue is very complex. I've spent an hour and a half on it already today and haven't been able to solve it. My work is in radar/spree@377253b6ac060a63895778bfd49a5df581d88553, the payment_tracking branch.
What I can see are two distinct problems here.
The first problem is that the checkout isn't acknowledging there could be multiple payment attempts for an order. It only sees the first. By removing
The second problem is more... "interesting". When Spree processes payments for an order, it processes them through the registered gateway and then that gateway is supposed to give a response back. If that response is a "successful" response, then everything is fine and we all go home happy. However, if the response is "failed", then a
This last problem is what I spent the majority of the time looking into and I couldn't solve it at all. It needs to be solved because if a payment fails, we shouldn't redirect people back to the confirm screen, but rather the payment screen again so that they can make another payment. This issue also means that we're not tracking any failed payments in Spree whatsoever. Failed payments are in the "checkout" state, and (again), that's just plain wrong.
@schof, I am probably not the most qualified to do this given how green I am. Would be happy to play along with someone to make it a teaching moment, but suspect someone more experienced could make short work of this. I would not know where to start with that task.
Are you normally available during standard US business hours? You could hop on #spree on irc.freenode.net and Radar or I (GeekOnCoffee) or somebody in the community could walk you through it. There's usually somebody there who could help, but at the moment US business hours are your best bet.
On Mar 6, 2013, at 3:53 PM, Randy Terbush firstname.lastname@example.org wrote: