ASPX templates
Version 5.x > ASPX templates > Order Created Before Payment Taken View modes: 
User avatar
Member
Member
steve-greyghoststudio - 5/12/2010 5:03:42 PM
   
Order Created Before Payment Taken
It appears the default behavior of the checkout process is to create an order in the system even before the PAYMENT has been taken. Is it me or does that seem odd? I guess it goes along with the ability to click a 'skip payment' button.

Is there a way to hold that action until PAYMENT is taken? I guess I could yank the code out of the ProcessStep() function of the ShoppingCartPreview.ascx control and move it to the ShoppingCartPaymentShipping.ascx control. But that seems a bit extreme, no?

Any suggestions?

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 5/17/2010 11:19:41 AM
   
RE:Order Created Before Payment Taken
Hi,

The default checkout process is described in following documentation:

http://devnet.kentico.com/docs/ecommerceguide/making_your_first_purchase.htm
http://devnet.kentico.com/docs/ecommerceguide/purchase_process_overview.htm

So, in other words, the order is saved and then there is option to provide customer/user with some payment step. Some of the payment providers might respond to payment operation in few days, so the order needs to be created in Kentico CMS in order to update the payment result in the order once the payment provider responds to the payment operation (this operation may me successful or not).

Could you please let me know why would you like to save the order afterwards? Any specific reason?

In your case, there will be no entry in database about the order if the payment will not be successful.

Best regards,
Miroslav Remias.

User avatar
Member
Member
steve-greyghoststudio - 5/17/2010 12:10:42 PM
   
RE:Order Created Before Payment Taken

Hi Miroslav,

Thanks for the information. Below is what I'm thinking I need from the tool.

I would like the order to be created in the same step as the payment, basically after the user enters valid credit card information. The code should go out and authorize/capture the credit cart transaction. If that is successful (from Authorize.Net) then and only then should the order be created and the appropriate payment data saved to the order. If there are errors from the authorization, then those should be shown to the user and allow them to fix them or enter a different card before continuing.

Otherwise customers could get to the payment part (entering cc number) and then cancel by clicking on the menu or exiting the site. This would leave a bunch of orders that were never really completed or wanted. But the sales group would have to follow up with each one to make sure.

I'm guessing I'll just combine the 2 checkout step controls into one and monkey with the logic to get the above behavior, no?

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 5/24/2010 9:06:05 AM
   
RE:Order Created Before Payment Taken
Hi,

To be honest here, you are probably the first person I know which requires such behavior. However, you can modify this behavior according your needs, but you would need to create your own custom payment gateway (http://devnet.kentico.com/docs/ecommerceguide/developing_custom_payment_gateways.htm) since our
Authorize.NET payment gateway works only with stored order (this can not be modified without source code version of Kentico CMS), so in other words, this payment gateway updates the order result according the payment result, so the order needs to exists in database.

Best regards,
Miroslav Remias.