[+] MO : Uptdate module to store payment cc information

This commit is contained in:
vSchoener
2011-10-27 15:15:30 +00:00
parent 8e35ab7208
commit 8150ec7439
6 changed files with 85 additions and 8 deletions
+5 -1
View File
@@ -84,7 +84,11 @@ if ($state != Configuration::get('PS_OS_ERROR'))
}
}
$module->validateOrder((int)($cart->id), $state, (float)($cart->getOrderTotal(true, Cart::BOTH)), $module->displayName, $message, NULL, (int)($currency->id), false, $cart->secure_key);
$module->setTransactionDetail(array(
'transaction_id', $disposition['mtid']));
$module->validateOrder((int)($cart->id), $state, (float)($cart->getOrderTotal(true, Cart::BOTH)),
$module->displayName, $message, NULL, (int)($currency->id), false, $cart->secure_key);
if ($state == Configuration::get('PS_OS_ERROR'))
{
+16
View File
@@ -123,5 +123,21 @@ class PaysafeCard extends PSCPrepaidServices
return $error_msg[$error_code];
}
/**
* Set the detail of a payment - Call before the validate order init
* correctly the pcc object
* See Authorize documentation to know the associated key => value
* @param array fields
*/
public function setTransactionDetail($response)
{
// If Exist we can store the details
if (isset($this->pcc))
{
$this->pcc->transaction_id = (string)$response['transaction_id'];
}
}
}