Skip to content

Commit

Permalink
Add option for text on statement, remove unused default config values,
Browse files Browse the repository at this point in the history
…fix #8
  • Loading branch information
RBech committed Apr 30, 2018
1 parent 06655fe commit 1e293fd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion app/code/community/Quickpay/Payment/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();
}

Expand Down
4 changes: 1 addition & 3 deletions app/code/community/Quickpay/Payment/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,11 @@
<agreementid>ENTER YOUR AGREEMENT ID HERE</agreementid>
<cardtype>0</cardtype>
<sendmailorderconfirmation>1</sendmailorderconfirmation>
<sendmailorderconfirmationbefore>1</sendmailorderconfirmationbefore>
<sendmailorderconfirmationbefore>0</sendmailorderconfirmationbefore>
<cardlogos>dankort,visa,mastercard,maestro</cardlogos>
<handlestock>1</handlestock>
<allowspecific>0</allowspecific>
<instructions>Pay with your credit card via QuickPay</instructions>
<transaction_type>O</transaction_type>
<post_url>https://secure.quickpay.dk/form/</post_url>
<instantcapture>0</instantcapture>
<instantinvoice>0</instantinvoice>
<transactionfee>0</transactionfee>
Expand Down
10 changes: 10 additions & 0 deletions app/code/community/Quickpay/Payment/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,16 @@
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</sendmailorderconfirmationbefore>
<text_on_statement translate="label comment">
<label>Text on statement</label>
<comment><![CDATA[Text that will be placed on cardholder’s bank statement (MAX 22 ASCII characters and <strong>only supported by Clearhaus currently</strong>).<br>Has to start with Default descriptor, as described in your agreement with Clearhaus]]></comment>
<frontend_type>text</frontend_type>
<validate>validate-length maximum-length-22</validate>
<sort_order>80</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</text_on_statement>
<handlestock translate="label comment">
<label>Håndtering af lager. Varene vil først trækkes fra lageret, når betalingen er gennemført.</label>
<comment>OBS! Annullering af ikke betalte ordre, vil give falske lagerantal, med mindre Magento
Expand Down

0 comments on commit 1e293fd

Please sign in to comment.