Merge branch 'ticket-payboxAgreement' into develop
This commit is contained in:
commit
e5aecd0e46
@ -50,7 +50,7 @@ $numbers = urldecode($paybox_card['handle']);
|
||||
$dateval = $paybox_card['date'];
|
||||
$customer = new Customer((int)$cart->id_customer);
|
||||
$refabonne = $customer->email;
|
||||
$language = new Language((int)$cart->id_lang);
|
||||
$language = new Language((int)$cart->id_lang);
|
||||
switch ($language->iso_code)
|
||||
{
|
||||
case 'fr':
|
||||
@ -114,12 +114,24 @@ $autorisation = explode('AUTORISATION=', $data[5]);
|
||||
$code_reponse = explode('CODEREPONSE=', $data[6]);
|
||||
$commentaire = explode('COMMENTAIRE=', $data[7]);
|
||||
|
||||
mail('marion@antadis.com', '[BBB] Paiement direct reponse globale', $data);
|
||||
mail('marion@antadis.com', '[BBB] Paiement direct reponse globale', $response);
|
||||
|
||||
$error = '';
|
||||
$paybox = new Paybox();
|
||||
$test_mode = (int)Configuration::get('PBX_DEMO_MODE');
|
||||
|
||||
$values = array(
|
||||
'm' => (int) $montant,
|
||||
'r' => (int) $cart->id,
|
||||
't' => (int) $num_appel[1],
|
||||
'p' => $autorisation[1],
|
||||
'c' => $paybox_card['payment_type'],
|
||||
'a' => 'CARTE',
|
||||
's' => (int) $num_trans[1],
|
||||
'e' => $code_reponse[1],
|
||||
'd' => $paybox_card['date'],
|
||||
);
|
||||
|
||||
if ($code_reponse[1] == "00000" || $code_reponse[0] == "00000") {
|
||||
// payment success
|
||||
|
||||
@ -135,17 +147,6 @@ if ($code_reponse[1] == "00000" || $code_reponse[0] == "00000") {
|
||||
|
||||
if ($id_order = (int)Order::getOrderByCartId($cart->id))
|
||||
{
|
||||
$values = array(
|
||||
'm' => (int) $montant,
|
||||
'r' => (int) $cart->id,
|
||||
't' => (int) $num_appel[1],
|
||||
'p' => $autorisation[1],
|
||||
'c' => $paybox_card['payment_type'],
|
||||
'a' => 'CARTE',
|
||||
's' => (int) $num_trans[1],
|
||||
'e' => $code_reponse[1],
|
||||
'd' => $paybox_card['date'],
|
||||
);
|
||||
$paybox->saveInformationPaiement($values);
|
||||
|
||||
if (empty($error))
|
||||
@ -277,7 +278,7 @@ if ($code_reponse[1] == "00000" || $code_reponse[0] == "00000") {
|
||||
break;
|
||||
}
|
||||
|
||||
$error .= 'PayBox version: '.$paybox->version."\n".'<br> POST '.print_r($trame, true)."\n".'<br>GET '.print_r($reponse, true)."\n";
|
||||
$error .= 'PayBox version: '.$paybox->version."\n".'<br> POST '.print_r($values, true)."\n".'<br>GET '.print_r($response, true)."\n";
|
||||
$paybox->validateOrder((int)$cart->id, $statut, $total_paid, $paybox->displayName, $error, array(), NULL, false, $customer->secure_key);
|
||||
|
||||
// save info paiement BDD
|
||||
|
Loading…
Reference in New Issue
Block a user