Post by X-Rayden » Sat May 17, 2008 4:56 pm

when we run the checkout_process controler, it should clear the cart as the paie should have been made.

but my module only wait for a callback, i've used checkout_success as a return to my site link... but with a checkout_success and a callback ONLY it wont clear the user's cart.

is there a way to use the sucess controller to clear the cart ? like index.php?controller=checkout_success&action=clear the cart... ?

User avatar
New member

Posts

Joined
Sat Jan 12, 2008 3:54 am
Location - Québec, Qc, Canada

Post by bruce » Sat May 17, 2008 7:31 pm

sure, use the same code as in catalog\controller\checkout_process.php at the point in your code just after you call $order->process()

ie:

Code: Select all

		$cart     =& $this->locator->get('cart');		
		$cart->clear();

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by X-Rayden » Mon May 19, 2008 1:03 pm

it does not work properly

Notice:  Undefined property:  Paymentisecureca::$locator in /home/frederic/public_html/accestelecom.ca/catalog/extension/payment/isecureca.php on line 169

Fatal error:  Call to a member function get() on a non-object in /home/frederic/public_html/accestelecom.ca/catalog/extension/payment/isecureca.php on line 169

so i tried

Code: Select all

$this->order->process();
$this->cart->clear();
work, but, not! my cart is still not empty, because the "process" is not made by a user action, it can come back to the site and still view the same order while the callback is working... if i empty the cart by the user, then the callback is not made and the payment do not pass...

User avatar
New member

Posts

Joined
Sat Jan 12, 2008 3:54 am
Location - Québec, Qc, Canada

Post by bruce » Mon May 19, 2008 1:20 pm

If you like, you can post your file, or email it to me and I will have a look.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by wendynovianto » Fri May 23, 2008 7:57 pm

Same problem with me when trying to implement SIM on Authorize.net. Having an ugly white screen is ok to me as long as I'm still receiving the response back from Authorize.net and it will redirect to the right place. The problem is the cart is not being emptied on my payment gateway integration. If you can solve this, it will be awesome...

Newbie

Posts

Joined
Wed Apr 23, 2008 4:26 pm

Post by bruce » Sat May 24, 2008 11:56 am

You both need to call the code to clear the cart in the part of the payment gateway processing which is initiated by the user. ie Probably just before going to the payment gateway for authorisation. (this causes a problem for rejection/cancellation workflow though)

The order information will still be available via $order->load($reference) which can be called by the gateway confirmation.

All of these redirection gateways have the same workflow problems as the default paypal one. Have a look at the "paypal improved" contribution AND the forum thread discussing fixes and additions to it. You could get some ideas for your own gateways from that.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm
Who is online

Users browsing this forum: No registered users and 1 guest