예제 #1
0
 public function validate()
 {
     $customer = new Customer($this->id_customer);
     $paiement = new EbayPayment();
     $paiement->validateOrder((int) $this->cart->id, Configuration::get('PS_OS_PAYMENT'), (double) $this->cart->getOrderTotal(true, 3), 'eBay ' . $this->payment_method . ' ' . $this->id_order_seller, null, array(), (int) $this->cart->id_currency, false, $customer->secure_key, version_compare(_PS_VERSION_, '1.5', '>') ? new Shop((int) Configuration::get('PS_SHOP_DEFAULT')) : null);
     $this->id_order = $paiement->currentOrder;
     // Fix on date
     Db::getInstance()->autoExecute(_DB_PREFIX_ . 'orders', array('date_add' => pSQL($this->date_add)), 'UPDATE', '`id_order` = ' . (int) $this->id_order);
     return $paiement->currentOrder;
 }
예제 #2
0
 public function validate($id_shop, $id_ebay_profile = null)
 {
     $customer = new Customer($this->id_customers[$id_shop]);
     $paiement = new EbayPayment();
     //Change context's currency
     $this->context->currency = new Currency($this->carts[$id_shop]->id_currency);
     $paiement->validateOrder((int) $this->carts[$id_shop]->id, Configuration::get('PS_OS_PAYMENT'), (double) $this->carts[$id_shop]->getOrderTotal(true, 3), 'eBay ' . $this->payment_method . ' ' . $this->id_order_seller, null, array(), (int) $this->carts[$id_shop]->id_currency, false, $customer->secure_key, version_compare(_PS_VERSION_, '1.5', '>') ? new Shop((int) $id_shop) : null);
     $this->id_orders[$id_shop] = $paiement->currentOrder;
     $this->_writeLog($id_ebay_profile, 'validate_order', true, 'End of validate order');
     // Fix on date
     Db::getInstance()->autoExecute(_DB_PREFIX_ . 'orders', array('date_add' => pSQL($this->date_add)), 'UPDATE', '`id_order` = ' . (int) $this->id_orders[$id_shop]);
     return $paiement->currentOrder;
 }