2

I am using the off-site gateway, and I am locking my shopping cart upon choosing Dwolla for payment, but if the user cancels, I want to be able to unlock the cart and not allow the user to use the generated CheckoutId for purchase. Any direction on this?

2 Answers2

0

As long as you've set a value for "redirect" in your request to https://www.dwolla.com/payment/request (e.g "https://www.myurl.com/redirect"), a customer who cancels will end up here:

https://www.myurl.com/redirect?error=failure&error_description=User Cancelled

From there, it's a simple matter to check the query string. This part depends on your language, but in PHP you can $_GET["error_description"] and see if it's "User Cancelled" - if so, unlock the cart. The next time the user goes through the checkout process, they'll trigger another payment request, which will respond with a new CheckoutId.

Eric Tjossem
  • 2,536
  • 1
  • 15
  • 18
0

There's no way to invalidate a checkout session... On the other hand, though, checkout sessions invalidate themselves after 15 minutes of being created, or after first complete usage; whichever comes first...