I'm trying to get the trunk Payment module working on Paypal, with trunk e-commerce.
However there seems to be an issue with the AuthorisationCode, I cannot find anything in the code that sets this.
On the PayPalForm it's put as:
$inputs['custom'] = $this->ID . '-' . $this->AuthorisationCode;
which is always like '5-'.
Paypal returns this, but in the 'complete' method of the handler this is checked:
if(isset($_REQUEST['custom']) && $custom = $_REQUEST['custom']) {
$params = explode('-', $custom);
if(count($params) == 2) {
if($payment = DataObject::get_by_id('PayPalPayment', $params[0])) {
if($payment->AuthorisationCode == $params[1]) {
...
But, as $params[1] is never set, nothing of this ever happens and I get errors.
Anything I'm missing here?
Someone on IRC apparently had this problem as well and changed the code, set the AuthorisationCode on the form as the order uid:
$this->AuthorisationCode = $order->UID;
$this->write();
However, what is the real purpose of AuthorisationCode? I cannot see it working as currently implemented in trunk?