Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Ecommerce Paypal clearing basket before order complete View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
adam - 2/10/2012 6:50:33 AM
   
Ecommerce Paypal clearing basket before order complete
Hi

We have an ecommerce site set up that takes two forms of payment

customer credit
paypal

When someone pays by customer credit the order is set to completed and removed from basket which is fine cause they have paid. However if the payment method is PayPal when we redirect to PayPal to take the payment the basket is cleared and the order is set in the CMSDesk with status "Awating Payment".

is it possible to keep the items in the basket until we get the return from PayPal and the order status is complete?

i've looked at the ShoppingCartPaymentGateway.ascx.cs and can see that when certain conditions are met ShoppingCartControl.CleanUpShoppingCart(); is called . i've commented these out to try to keep the basket data but this hasn't worked.

Where is the basket cleared before the order is set to "Payment received"?
is there a reason this is done by Kentico?


User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 2/18/2012 9:10:26 PM
   
RE:Ecommerce Paypal clearing basket before order complete
Hi,

When using built-in PayPal payment gateway, shopping cart data is cleared right before the system (CMS) redirects you to the PayPal in the ProcessPayment method of the CMSPayPalProvider class which you can not change without having source code version of Kentico CMS. This behavior is by design.

What you can do is to develop your custom payment gateway which will behave differently:

http://devnet.kentico.com/docs/ecommerceguide/developing_custom_payment_gateways.htm

Thanks,
Miro