Search code examples
coldfusionpayment-gatewaycoldfusion-9dwolla

How to use Dwolla with Coldfusion?


Ok I have a website and have used credit card processing on it before. Here is a simple run down of how it runs:

User Enters Page ----> User Fills out Form with Order Total ----> Submit ----> Coldfusion goes out to Authorize.net to process card ----> Results are Returned (Approved, Denied, Error) ----> CFIF Card is approved, enter info from the Form into database ----> E-mail receipt to user ----> Show order page to user ----> Done.

This to me makes sense, and it all happens in one Click of clicking submit.

But how do I keep this kind of transaction going, when someone has to go out and make the payment at a different site? How do I stop CF from processing all those steps after "Submit" while they are paying at Dwolla, and how do I know they've paid?

They don't have any documentation on ColdFusion and I'd love to build this for my site, but I just need a general point in the right direction. What do I need to keep in mind to make this work? What is sort of the process that is different with Dwolla than what I've used with Authorize.net?

Thanks for the help!


Solution

  • It looks to me like the process you're describing is what they refer to as 'Submit Directly'

    The key to synchronising this is that you provide a callback URL as a parameter to them. It looks like their service POSTs a success message to your app.

    It sounds from your description of the process that you may not be storing the basket/order until after payment has succeeded. This leaves the possibility that payment succeeds, but the browser crashes/looses connection before returning to your site.

    Ideally you'd probably store the basket as an order in an 'unpaid' state before the user goes out to pay and when this callback is called you'd change it to 'paid' and initiate whatever fulfulment process you need. It looks like the whole Dwolla API works around the notion of there being an order ID before you start the payment process.