From 1e293fd9d68941cc53f82245d3422682bc768a97 Mon Sep 17 00:00:00 2001 From: Rasmus Bech Date: Mon, 30 Apr 2018 21:00:04 +0200 Subject: [PATCH] Add option for text on statement, remove unused default config values, fix #8 --- app/code/community/Quickpay/Payment/Helper/Data.php | 6 +++++- app/code/community/Quickpay/Payment/etc/config.xml | 4 +--- app/code/community/Quickpay/Payment/etc/system.xml | 10 ++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/code/community/Quickpay/Payment/Helper/Data.php b/app/code/community/Quickpay/Payment/Helper/Data.php index a7ebca9..eca4049 100644 --- a/app/code/community/Quickpay/Payment/Helper/Data.php +++ b/app/code/community/Quickpay/Payment/Helper/Data.php @@ -98,6 +98,10 @@ public function qpCreatePayment(Mage_Sales_Model_Order $order) $postArray['order_id'] = $order->getIncrementId(); $postArray['currency'] = $order->getOrderCurrency()->ToString(); + if ($textOnStatement = Mage::getStoreConfig('payment/quickpaypayment_payment/text_on_statement')) { + $postArray['text_on_statement'] = $textOnStatement; + } + $shippingAddress = $order->getShippingAddress(); $billingAddress = $order->getBillingAddress(); @@ -376,7 +380,7 @@ public function refund(Mage_Sales_Model_Order $order, $refundtotal) Mage::throwException(Mage::helper('quickpaypayment')->__('Max beløb der kan refunderes: %s', $qpOrderStatus['capturedAmount'])); } - $order->addStatusToHistory($order->getStatus(), Mage::helper('quickpaypayment')->__('Kreditnota refunderede % online', number_format($refundtotal, 2, ",", "")), false); + $order->addStatusToHistory($order->getStatus(), Mage::helper('quickpaypayment')->__('Kreditnota refunderede %s online', number_format($refundtotal, 2, ",", "")), false); $order->save(); } diff --git a/app/code/community/Quickpay/Payment/etc/config.xml b/app/code/community/Quickpay/Payment/etc/config.xml index 2bd931e..aba7b74 100644 --- a/app/code/community/Quickpay/Payment/etc/config.xml +++ b/app/code/community/Quickpay/Payment/etc/config.xml @@ -178,13 +178,11 @@ ENTER YOUR AGREEMENT ID HERE 0 1 - 1 + 0 dankort,visa,mastercard,maestro 1 0 Pay with your credit card via QuickPay - O - https://secure.quickpay.dk/form/ 0 0 0 diff --git a/app/code/community/Quickpay/Payment/etc/system.xml b/app/code/community/Quickpay/Payment/etc/system.xml index c86af9c..37e36c1 100644 --- a/app/code/community/Quickpay/Payment/etc/system.xml +++ b/app/code/community/Quickpay/Payment/etc/system.xml @@ -182,6 +182,16 @@ 1 1 + + + only supported by Clearhaus currently).
Has to start with Default descriptor, as described in your agreement with Clearhaus]]>
+ text + validate-length maximum-length-22 + 80 + 1 + 1 + 1 +
OBS! Annullering af ikke betalte ordre, vil give falske lagerantal, med mindre Magento