[SOLVED] CCBILL payment gateway _basketFromCookie not consistent

5 years 4 months ago - 5 years 4 months ago #308990 by buzibuzi
Hi,
from time to time, the _basketFromCookie Method (cbpaidsubscriptions.ccbill.php) doesn't return the OrderID value from the stored cookie.
this results in failure to process the IPN reply and a failed Order completion.

have you encountered this behavior ? any idea what i can do to fix it ?
protected function handleReturn( $paymentBasket, $postdata )
	{
		$requestdata	=	array();

		// Our only way was to store into a browser cookie the basket params, as CCBill doesn't return anything custom: get it:
		$this->_basketFromCookie( $requestdata );

		return $this->_returnParamsHandler( $paymentBasket, $requestdata, 'R' );
	}

Thanks

Please Log in to join the conversation.

5 years 4 months ago - 5 years 4 months ago #308991 by buzibuzi
ok, solved it.
since im using a sub folder for development, the cookie's path was not correct.
adding the path param to PHP setcookie() function in _getBasicRequstParams method fixed it
setcookie( 'cbsubs_ccbill_basket', (int) $paymentBasket->id . '|' . $paymentBasket->shared_secret, ( time() + ( 3600 * 16 ) ), '/', '.mydomain.com' );

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.152 seconds

Facebook Twitter LinkedIn