Merge branch 'ticket-payboxAgreement' into develop
This commit is contained in:
commit
e5aecd0e46
@ -114,12 +114,24 @@ $autorisation = explode('AUTORISATION=', $data[5]);
|
|||||||
$code_reponse = explode('CODEREPONSE=', $data[6]);
|
$code_reponse = explode('CODEREPONSE=', $data[6]);
|
||||||
$commentaire = explode('COMMENTAIRE=', $data[7]);
|
$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 = '';
|
$error = '';
|
||||||
$paybox = new Paybox();
|
$paybox = new Paybox();
|
||||||
$test_mode = (int)Configuration::get('PBX_DEMO_MODE');
|
$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") {
|
if ($code_reponse[1] == "00000" || $code_reponse[0] == "00000") {
|
||||||
// payment success
|
// payment success
|
||||||
|
|
||||||
@ -135,17 +147,6 @@ if ($code_reponse[1] == "00000" || $code_reponse[0] == "00000") {
|
|||||||
|
|
||||||
if ($id_order = (int)Order::getOrderByCartId($cart->id))
|
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);
|
$paybox->saveInformationPaiement($values);
|
||||||
|
|
||||||
if (empty($error))
|
if (empty($error))
|
||||||
@ -277,7 +278,7 @@ if ($code_reponse[1] == "00000" || $code_reponse[0] == "00000") {
|
|||||||
break;
|
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);
|
$paybox->validateOrder((int)$cart->id, $statut, $total_paid, $paybox->displayName, $error, array(), NULL, false, $customer->secure_key);
|
||||||
|
|
||||||
// save info paiement BDD
|
// save info paiement BDD
|
||||||
|
Loading…
Reference in New Issue
Block a user