Пример #1
0
 case "diagnosis":
     break;
 case "checkout-redirect":
     break;
 case "merchant-calculation-callback":
     break;
 case "new-order-notification":
     // secure_cart[0] => id_cart
     // secure_cart[1] => secure_key
     $gcheckout = new GCheckout();
     $secure_cart = explode('|', $data[$root]['shopping-cart']['merchant-private-data']['VALUE']);
     $cart = new Cart((int) $secure_cart[0]);
     $currency = $gcheckout->getCurrency((int) $cart->id_currency);
     unset($cart);
     $orderTotal = (double) $data[$root]['order-total']['VALUE'];
     $gcheckout->validateOrder((int) $secure_cart[0], Configuration::get('PS_OS_PAYMENT'), (double) $orderTotal, $gcheckout->displayName, NULL, array(), NULL, false, $secure_cart[1]);
     $Gresponse->SendAck();
     break;
 case "order-state-change-notification":
     $Gresponse->SendAck();
     break;
 case "charge-amount-notification":
     $Gresponse->SendAck();
     break;
 case "chargeback-amount-notification":
     $Gresponse->SendAck();
     break;
 case "refund-amount-notification":
     $Gresponse->SendAck();
     break;
 case "risk-information-notification":
Пример #2
0
 case "request-received":
     break;
 case "error":
     break;
 case "diagnosis":
     break;
 case "checkout-redirect":
     break;
 case "merchant-calculation-callback":
     break;
 case "new-order-notification":
     $gcheckout = new GCheckout();
     $id_cart = intval($data[$root]['shopping-cart']['merchant-private-data']['VALUE']);
     $cart = new Cart($id_cart);
     $orderTotal = floatval($data[$root]['order-total']['VALUE']);
     $gcheckout->validateOrder($id_cart, _PS_OS_PAYMENT_, $cart->getOrderTotal(), $gcheckout->displayName);
     $Gresponse->SendAck();
     break;
 case "order-state-change-notification":
     $Gresponse->SendAck();
     break;
 case "charge-amount-notification":
     $Gresponse->SendAck();
     break;
 case "chargeback-amount-notification":
     $Gresponse->SendAck();
     break;
 case "refund-amount-notification":
     $Gresponse->SendAck();
     break;
 case "risk-information-notification":
Пример #3
0
 case "diagnosis":
     break;
 case "checkout-redirect":
     break;
 case "merchant-calculation-callback":
     break;
 case "new-order-notification":
     // secure_cart[0] => id_cart
     // secure_cart[1] => secure_key
     $gcheckout = new GCheckout();
     $secure_cart = explode('|', $data[$root]['shopping-cart']['merchant-private-data']['VALUE']);
     $cart = new Cart((int) $secure_cart[0]);
     $currency = $gcheckout->getCurrency((int) $cart->id_currency);
     unset($cart);
     $orderTotal = (double) $data[$root]['order-total']['VALUE'];
     $gcheckout->validateOrder((int) $secure_cart[0], _PS_OS_PAYMENT_, (double) $orderTotal, $gcheckout->displayName, NULL, array(), NULL, false, $secure_cart[1]);
     $Gresponse->SendAck();
     break;
 case "order-state-change-notification":
     $Gresponse->SendAck();
     break;
 case "charge-amount-notification":
     $Gresponse->SendAck();
     break;
 case "chargeback-amount-notification":
     $Gresponse->SendAck();
     break;
 case "refund-amount-notification":
     $Gresponse->SendAck();
     break;
 case "risk-information-notification":