fix refabonne

This commit is contained in:
Christophe LATOUR 2017-12-06 16:00:38 +01:00
parent 5f2f5e09c3
commit fd2a170214

View File

@ -105,7 +105,7 @@ class PayboxController extends ApiBaseController {
't' => (int)$response['NUMAPPEL'], 't' => (int)$response['NUMAPPEL'],
'p' => $response['AUTORISATION'], 'p' => $response['AUTORISATION'],
//TODO //TODO
'c' => $input_data['CARD_TYPE'], 'c' => isset($input_data['CARD_TYPE']) ? $input_data['CARD_TYPE'] : 'Inconnu',
'a' => 'CARTE', 'a' => 'CARTE',
's' => (int)$response['NUMTRANS'], 's' => (int)$response['NUMTRANS'],
'e' => $response['CODEREPONSE'], 'e' => $response['CODEREPONSE'],
@ -126,7 +126,8 @@ class PayboxController extends ApiBaseController {
$info = '<b>Successful operation</b><br>'."\n\n"; $info = '<b>Successful operation</b><br>'."\n\n";
$info .= 'PayBox version: '.$paybox->version."\n".'<br> POST '.print_r($this->postFields, true)."\n".'<br>GET '.print_r($response, true)."\n"; $info .= 'PayBox version: '.$paybox->version."\n".'<br> POST '.print_r($this->postFields, true)."\n".'<br>GET '.print_r($response, true)."\n";
$paybox->validateOrder((int)$cart->id, _PS_OS_PAYMENT_, ((int)$input_data['MONTANT']) / 100, $paybox->displayName, $info, array(), NULL, false, $user->secure_key, $data); $paybox->validateOrder((int)$cart->id, _PS_OS_PAYMENT_, ((int)$input_data['MONTANT']) / 100, $paybox->displayName, $info, array(), NULL, false, $user->secure_key, $data);
$paybox->saveInformationPaiement($data); $refabonne = isset($input_data['REFABONNE']) && !empty(trim($input_data['REFABONNE'])) ? $input_data['REFABONNE'] : null;
$paybox->saveInformationPaiement($data, false, $refabonne);
} }
$cart::$_shouldRenderOrderId = true; $cart::$_shouldRenderOrderId = true;
return $cart; return $cart;