Skip to content

Commit

Permalink
Merge pull request #46 from paynl/feature/plug-995
Browse files Browse the repository at this point in the history
PLUG-955 : Updated texts
  • Loading branch information
woutse authored Jun 23, 2022
2 parents 3a75e9a + b555613 commit 28ace63
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 40 deletions.
3 changes: 1 addition & 2 deletions Controller/Checkout/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ private function processPaidOrder(Transaction $transaction, Order $order)
}

if ($transaction->isAuthorized()) {
$authAmount = $this->config->useMagOrderAmountForAuth() ? $order->getBaseGrandTotal() : $transaction->getCurrencyAmount();
$payment->registerAuthorizationNotification($authAmount);
$payment->registerAuthorizationNotification($paidAmount);
} else {
$payment->registerCaptureNotification($paidAmount, $this->config->isSkipFraudDetection());
}
Expand Down
5 changes: 0 additions & 5 deletions Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,6 @@ public function isAlwaysBaseCurrency()
return $this->store->getConfig('payment/paynl/always_base_currency') == 1;
}

public function useMagOrderAmountForAuth()
{
return $this->store->getConfig('payment/paynl/use_magorder_for_auth') == 1;
}

public function useSkuId()
{
return $this->store->getConfig('payment/paynl/use_sku_id') == 1;
Expand Down
2 changes: 1 addition & 1 deletion Model/Config/Source/DefaultPaymentOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function toArray()
$scopeConfigInterface = $objectManager->get(\Magento\Framework\App\Config\ScopeConfigInterface::class);
//get only PAY. Methods
$active_paynl_methods = [];
$active_paynl_methods[0] = 'None';
$active_paynl_methods[0] = __('None');
foreach ($activePaymentMethods as $key => $value) {
if (strpos($key, 'paynl') !== false && $key != 'paynl_payment_paylink') {
$active_paynl_methods[$key] = $scopeConfigInterface->getValue('payment/' . $key . '/title');
Expand Down
2 changes: 1 addition & 1 deletion Model/Config/Source/ProductDataID.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function toOptionArray()
public function toArray()
{
return [
'0' => __('product-ID (default)'),
'0' => __('Product-ID (default)'),
'1' => __('SKU-ID'),
];
}
Expand Down
33 changes: 10 additions & 23 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="payment">
<group id="paynl" translate="label" type="text" sortOrder="11" showInDefault="1" showInWebsite="1"
showInStore="1">
<group id="paynl" translate="label" type="text" sortOrder="11" showInDefault="1" showInWebsite="1" showInStore="1">
<label>PAY. Settings</label>
<field id="version" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1"
showInStore="1">
<field id="version" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Version</label>
<frontend_model>Paynl\Payment\Block\Adminhtml\Render\Version</frontend_model>
</field>
Expand All @@ -18,43 +16,32 @@
<label>Testmode</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="tokencode" translate="label, comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1"
showInStore="1">
<field id="tokencode" translate="label, comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Tokencode</label>
<comment><![CDATA[Get your AT-code <a target='_blank' href='https://admin.pay.nl/company/tokens'>here</a>. Not registered at PAY? Sign up <a target='_blank' href='https://www.pay.nl/en?register'>here</a>!]]></comment>
</field>
<field id="apitoken" translate="label, comment" type="text" sortOrder="50" showInDefault="1" showInWebsite="1"
showInStore="1">
<field id="apitoken" translate="label, comment" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
<label>API-token</label>
<comment><![CDATA[Your API-token, you can find your tokens <a target='_blank' href='https://admin.pay.nl/company/tokens'>here</a>]]></comment>
</field>
<field id="serviceid" translate="label, comment" type="text" sortOrder="51" showInDefault="1" showInWebsite="1"
showInStore="1">
<field id="serviceid" translate="label, comment" type="text" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="1">
<label>ServiceId</label>
<comment><![CDATA[The SL-code of your service, you can find your services <a target='_blank' href='https://admin.pay.nl/programs/programs'>here</a>]]></comment>
</field>
<field id="language" translate="label" type="select" sortOrder="52" showInDefault="1" showInStore="1"
showInWebsite="1">
<label>Language payment screen</label>
<field id="language" translate="label" type="select" sortOrder="52" showInDefault="1" showInStore="1" showInWebsite="1">
<label>Language Payment Screen</label>
<source_model>Paynl\Payment\Model\Config\Source\Languages</source_model>
</field>
<field id="never_cancel" translate="label,comment" type="select" sortOrder="60" showInDefault="1"
showInWebsite="1" showInStore="1">
<field id="never_cancel" translate="label,comment" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Never cancel order</label>
<comment><![CDATA[This setting will disable cancelling the order when the payment is canceled.
This can be used if uncancelling the order in case of a second chance payment produces errors. WARNING! Orders will never be cancelled automaticly]]></comment>
<comment><![CDATA[This might be your preference when uncancelling orders isn't possible, which might lead to problems in case of a second chance payments.]]></comment>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="always_base_currency" translate="label,comment" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Always use base currency</label>
<comment><![CDATA[Set this to yes if you always want to process payments in the base currency of this store. Magento acts strange when trying to register a payment in another currency than the base currency. The base currency MUST be EUR]]></comment>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="use_magorder_for_auth" translate="label,comment" type="select" sortOrder="71" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Use base amount for authorisations</label>
<comment><![CDATA[Set this to yes to use base amount as authorize amount instead of currencyamount]]></comment>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="use_sku_id" translate="label,comment" type="select" sortOrder="72" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Productdata ID</label>
<comment><![CDATA[Set which product data to use as product ID in the PAY. backend.]]></comment>
Expand Down Expand Up @@ -125,7 +112,7 @@
</field>
<field id="register_partial_payments" translate="label" type="select" sortOrder="106" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Register partial payments</label>
<comment><![CDATA[Register partial payments]]></comment>
<comment><![CDATA[Enable to register every partial payment in your transactions tab, located in your order details.]]></comment>
<source_model>Paynl\Payment\Model\Config\Source\OffOn</source_model>
</field>
<field id="order_description_prefix" translate="label" type="text" sortOrder="107" showInDefault="1" showInWebsite="1" showInStore="1">
Expand Down
38 changes: 30 additions & 8 deletions i18n/nl_NL.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,36 @@
"The id of the payment method, only change this if you are told to do so","Het id van de betaalmethode, Wijzig dit alleen als je hiervoor instructies hebt gekregen"
"Testmode","Testmodus"
"Show bankselection","Bankselectie tonen"
"Select default payment option","Standaard betaalmethode"
"Order description prefix","Orderomschrijving"
"Prefix the order description with a custom word","Stel een prefix in voor uw orderomschrijving. Deze omschrijving ziet u terug bij de order in uw PAY. admin."
"Register partial payments","Deelbetalingen Registreren"
"API-token","API-token"
"Version","Versie"
"Set order on-hold","Order op on-hold zetten"
"ServiceId","ServiceId"
"Language payment screen","Taal betaalscherm"
"None","Geen"
"Select which size you'd like the icons to be.","Selecteer welke grootte u de betaaliconen in uw checkout wilt hebben."
"Icon size","Icoon Grootte"
"Extra small","Extra klein"
"Small","Klein"
"Medium","Normaal"
"Large","Groot"
"Extra large","Extra groot"
"Language Payment Screen","Taal Betaalscherm"
"Never cancel order","Order nooit annuleren"
"Paymentmethods","Betaalmethoden"
"This setting will disable cancelling the order when the payment is canceled.
This can be used if uncancelling the order in case of a second chance payment produces errors. WARNING! Orders will never be cancelled automatically","Deze instelling zorgt er voor dat orders niet meer geannuleerd worden.
Dit kan je gebruiken als het uncancellen van orders problemen geeft, bijvoorbeeld als je second chance gebruikt. WAARSCHUWING! Orders worden nooit meer automatisch geannuleerd"
"This might be your preference when uncancelling orders isn't possible, which might lead to problems in case of a second chance payments.","Stel in op `Ja` wanneer in uw Magento het ongedaan maken van geannuleerde bestelling niet mogelijk is, en daardoor problemen geeft bij `Second-Chance Payments`."
"Always use base currency","Altijd de standaard valuta gebruiken"
"Set this to yes if you always want to process payments in the base currency of this store. Magento acts strange when trying to register a payment in another currency than the base currency. The base currency MUST be EUR","Zet dit op ja om alle transacties altijd in de standaardvaluta te verwerken. Magento doet soms raar als je transacties verwerkt in een andere valuta. De standaardvaluta moet EUR zijn"
"Set this to yes if you always want to process payments in the base currency of this store. Magento acts strange when trying to register a payment in another currency than the base currency. The base currency MUST be EUR","Stel deze optie in op `Ja` indien u alle transacties altijd in de standaardvaluta wilt verwerken. De standaardvaluta moet hierbij `EUR` zijn."
"Skip fraud detection","Fraudedetectie overslaan"
"Sometimes magento incorrectly marks an order as fraudulent. this happens more often when using different currencies. Set this to yes to skip fraud detection.","Soms markeert magento transacties onterecht als frauduleus. Dit gebeurd vaak wanneer je verschillende valuta’s gebruikt. Zet deze instelling op Ja om magento’s fraudetedetcie over te slaan"
"Get your AT-code <a target='_blank' href='https://admin.pay.nl/company/tokens'>here</a>. Not registered at PAY? Sign up <a target='_blank' href='https://www.pay.nl/en?register'>here</a>!", "Je AT-code vind je <a target='_blank' href='https://admin.pay.nl/company/tokens'>hier</a>. Nog geen account bij PAY.? Klik <a target='_blank' href='https://www.pay.nl/en?register'>hier</a> om u aan te melden."
"Your API-token, you can find your tokens <a target='_blank' href='https://admin.pay.nl/company/tokens'>here</a>", "Jouw API-token, je kunt je tokens <a target='_blank' href='https://admin.pay.nl/company/tokens'>hier</a> vinden"
"The SL-code of your service, you can find your services <a target='_blank' href='https://admin.pay.nl/programs/programs'>here</a>", "De SL-code die bij je dienst hoort, je kunt je diensten <a target='_blank' href='https://admin.pay.nl/programs/programs'>hier</a> vinden",
"URL of the payment option icons. Default URL: https://static.pay.nl/payment_profiles/50x32/#paymentOptionId#.png","De URL van de payment option icoontjes. Standaard URL: https://static.pay.nl/payment_profiles/50x32/#paymentOptionId#.png"
"Send discount tax","Korting btw versturen"
"Set this to NO if you have a mix of low and high vatrate products. Some pay later methods have issues when the discount has a tax amount other than the default vat categories","Zet dit op NEE als je hoog en laag btw producten verkoopt. Achteraf betaaloplossingen kunnen niet omgaan met een kortingsregel van samengestelde btw"
"Send discount tax","Korting BTW versturen"
"Set this to NO if you have a mix of low and high vatrate products. Some pay later methods have issues when the discount has a tax amount other than the default vat categories","Selecteer `Nee` indien u producten verkoopt met een hoog en laag BTW percentage. Achteraf betaaloplossingen kunnen niet omgaan met een kortingsregel van samengestelde BTW."
"Paylink is only available for backorders and won't appear in the checkout","Paylink is alleen beschikbaar bij custom orders en komt niet tevoorschijn in de checkout"
"Thank you for your order from ","Bedankt voor je bestelling van "
"If you have questions about your order, you can email us at","Als u vragen heeft over uw bestelling, kunt u ons mailen op"
Expand All @@ -82,6 +93,7 @@
"Placed on","Geplaatst op"
"Qty","Aantal"
"Items","Producten"
"Enable to register every partial payment in your transactions tab, located in your order details.","Schakel in om deelbetalingen te registreren bij Transacties, te vinden bij uw bestelling-details."
"Price","Prijs"
"Subtotal","Subtotaal"
"Shipping & Handling","Verzendkosten"
Expand Down Expand Up @@ -115,7 +127,9 @@
"Required for business customers","Verplicht voor zakelijke klanten"
"COC number","KVK nummer"
"VAT-id","BTW nummer"
"URL the customer gets send to after cancelling payment. Default URL: checkout/cart","Geef aan naar welke URL de klant moet worden doorgeschakeld indien een betaling wordt geannuleerd. Standaard is dit: checkout/cart"
"Date of birth","Geboortedatum"
"Product-ID (default)","Product-ID (standaard)"
"Invalid VAT-id","Ongeldig BTW nummer"
"Enter a valid VAT-id","Voer een geldig BTW nummer in."
"Invalid date of birth","Ongeldig geboortedatum"
Expand All @@ -132,6 +146,14 @@
"Don't transfer analytics to PAY.","Stuur analytics niet via PAY."
"Disable","Uitzetten"
"Select whether you want to use PAY. as Google Analytics proxy.","Geef aan of u PAY. als Google Analytics proxy wilt gebruiken."
"Set which product data to use as product ID in the PAY. backend.","Set which product data to use as product ID in the PAY. backend."
"Set which product data to use as product ID in the PAY. backend.","Selecteer welk ID u wilt gebruiken als product-ID voor productdata naar PAY."
"Leave shipping address unchanged (Default)","Pas verzendadres niet aan (standaard)"
"Use billing address as shipping address","Gebruik factuuradres als verzendadres"
"Leave this empty unless advised otherwise by PAY.","Laat dit veld leeg tenzij anders wordt geadviseerd door PAY."
"Test IP Address","Test IP-adres"
"Forces testmode on these Ip addresses, separate ip's by comma's for multiple ip's","Forceer testmode bij de aangegeven IP-addressen(komma gescheiden)."
"Enable additional validation","Extra Checkout Validatie"
"Enable this to also apply the validation of other activated (third party) modules during the payment process.","Selecter `Aan` indien u meerdere (externe) modules heeft geinstalleerd die ook validatie (moeten) toepassen op de gebruikergegevens voordat de bestellingen geplaatst wordt."
"Set PAY. loglevel","Geef aan tot welk niveau logregels moeten worden opgeslagen"
"Select whether you want PAY. style applied to your checkout.","Geef aan of u PAY. styling wilt toepassen in uw checkout(Deze is vereist voor de optie `Icoon Grootte`)."
"Select whether you want to use classic icons, or the newest up-to-date icons.","Geef aan of u de oude stijl betaaliconen wilt gebruiken, of liever de meest up-to-date set afbeeldingen."

0 comments on commit 28ace63

Please sign in to comment.