/** * @param Mage_Sales_Model_Order $order * * @return Mage_Sales_Model_Order * @throws Exception */ public function manipulateOrderWithPaymentData($order) { $paymentInfo = $this->getShopgateOrder()->getPaymentInfos(); $this->getOrder()->getPayment()->setCcType($this->_getConfigCode()); $this->getOrder()->getPayment()->setCcOwner($paymentInfo['credit_card']['holder']); $this->getOrder()->getPayment()->setCcNumberEnc($paymentInfo['credit_card']['masked_number']); return parent::manipulateOrderWithPaymentData(); }
/** * Creates an invoice for the order * * @throws Exception */ protected function _addInvoice() { if ($this->getShopgateOrder()->getIsPaid()) { parent::_addInvoice(); } else { $info = $this->getShopgateOrder()->getPaymentInfos(); $invoice = $this->_getPaymentHelper()->createOrderInvoice($this->getOrder()); $invoice->setIsPaid(false); $invoice->setTransactionId($info['txn_id']); $invoice->save(); $this->getOrder()->addRelatedObject($invoice); } }
/** * @param Mage_Sales_Model_Order $order * @return Mage_Sales_Model_Order * @throws Exception */ public function manipulateOrderWithPaymentData($order) { $this->getOrder()->getPayment()->setPayoneOnlinebanktransferType($this->_getConfigCode()); return parent::manipulateOrderWithPaymentData(); }
/** * Rewritten to add additional clearing parameters to response * * @param null|Payone_Api_Response_Authorization_Approved|Payone_Api_Response_Preauthorization_Approved $response * @return Payone_Api_Response_Authorization_Approved|Payone_Api_Response_Preauthorization_Approved */ protected function _createFakeResponse($response = null) { $info = $this->getShopgateOrder()->getPaymentInfos(); $response = $this->_getPayoneResponse(); /** @var Payone_Api_Response_Authorization_Approved | Payone_Api_Response_Preauthorization_Approved $response */ foreach ($info as $key => $val) { switch ($key) { case 'clearing_bankaccount': $response->setClearingBankaccount($info[$key]); break; case 'clearing_bankcode': $response->setClearingBankcode($info[$key]); break; case 'clearing_bankcountry': $response->setClearingBankcountry($info[$key]); break; case 'clearing_bankname': $response->setClearingBankname($info[$key]); break; case 'clearing_bankaccountholder': $response->setClearingBankaccountholder($info[$key]); break; case 'clearing_bankcity': $response->setClearingBankcity($info[$key]); break; case 'clearing_bankiban': $response->setClearingBankiban($info[$key]); break; case 'clearing_bankbic': $response->setClearingBankbic($info[$key]); break; } } return parent::_createFakeResponse($response); }