/** * @param Payone_Api_Response_Interface $response */ protected function updatePaymentByResponse(Payone_Api_Response_Interface $response) { $payment = $this->getPayment(); $paymentMethod = $this->getPaymentMethod(); $payment->setLastTransId($response->getTxid()); if ($paymentMethod instanceof Payone_Core_Model_Payment_Method_AdvancePayment or $paymentMethod instanceof Payone_Core_Model_Payment_Method_Invoice or $paymentMethod instanceof Payone_Core_Model_Payment_Method_CashOnDelivery or $paymentMethod instanceof Payone_Core_Model_Payment_Method_SafeInvoice and $response instanceof Payone_Api_Response_Capture_Approved) { /** @var $response Payone_Api_Response_Authorization_Approved */ $payment->setPayoneClearingBankAccountholder($response->getClearingBankaccountholder()); $payment->setPayoneClearingBankCountry($response->getClearingBankcountry()); $payment->setPayoneClearingBankAccount($response->getClearingBankaccount()); $payment->setPayoneClearingBankCode($response->getClearingBankcode()); $payment->setPayoneClearingBankIban($response->getClearingBankiban()); $payment->setPayoneClearingBankBic($response->getClearingBankbic()); $payment->setPayoneClearingBankCity($response->getClearingBankcity()); $payment->setPayoneClearingBankName($response->getClearingBankname()); if ($response instanceof Payone_Api_Response_Capture_Approved) { $payment->setPayoneClearingReference($response->getClearingReference()); $payment->setPayoneClearingInstructionnote($response->getClearingInstructionnote()); $payment->setPayoneClearingLegalnote($response->getClearingLegalnote()); $payment->setPayoneClearingDuedate($response->getClearingDuedate()); } } }
/** * @param Payone_Api_Response_Interface $response */ protected function updatePaymentByResponse(Payone_Api_Response_Interface $response) { $payment = $this->getPayment(); $paymentMethod = $this->getPaymentMethod(); $payment->setLastTransId($response->getTxid()); if ($paymentMethod instanceof Payone_Core_Model_Payment_Method_AdvancePayment or $paymentMethod instanceof Payone_Core_Model_Payment_Method_Invoice or $paymentMethod instanceof Payone_Core_Model_Payment_Method_CashOnDelivery or $paymentMethod instanceof Payone_Core_Model_Payment_Method_SafeInvoice and $response instanceof Payone_Api_Response_Capture_Approved) { /** @var $response Payone_Api_Response_Authorization_Approved */ $payment->setPayoneClearingBankAccountholder($response->getClearingBankaccountholder()); $payment->setPayoneClearingBankCountry($response->getClearingBankcountry()); $payment->setPayoneClearingBankAccount($response->getClearingBankaccount()); $payment->setPayoneClearingBankCode($response->getClearingBankcode()); $payment->setPayoneClearingBankIban($response->getClearingBankiban()); $payment->setPayoneClearingBankBic($response->getClearingBankbic()); $payment->setPayoneClearingBankCity($response->getClearingBankcity()); $payment->setPayoneClearingBankName($response->getClearingBankname()); if ($response instanceof Payone_Api_Response_Capture_Approved) { $payment->setPayoneClearingReference($response->getClearingReference()); $payment->setPayoneClearingInstructionnote($response->getClearingInstructionnote()); $payment->setPayoneClearingLegalnote($response->getClearingLegalnote()); $payment->setPayoneClearingDuedate($response->getClearingDuedate()); } } elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_Ratepay) { $oSession = Mage::getSingleton('checkout/session'); $oSession->unsRatePayFingerprint(); } if ($response instanceof Payone_Api_Response_Authorization_Abstract) { if ($response->getAddPaydataClearingReference()) { $payment->setPayoneClearingReference($response->getAddPaydataClearingReference()); } elseif ($response->getClearingReference()) { $payment->setPayoneClearingReference($response->getClearingReference()); } } }