Skip to content

Commit

Permalink
corrected amount checking and fix translation
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-galas committed Oct 9, 2015
1 parent 67921cf commit d35fd24
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions languages/en-GB.plg_j2store_payment_dotpay.sys.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
J2STORE_DOTPAY_PAYMENT_DESC="Dotpay payment gateway for J2Store."
1 change: 1 addition & 0 deletions languages/pl-PL.plg_j2store_payment_dotpay.sys.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
J2STORE_DOTPAY_PAYMENT_DESC="System płatności dla J2Store"
4 changes: 2 additions & 2 deletions payment_dotpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,10 @@ private function getValidation($data) {
if (hash('sha256', $string) != $data->getString('signature')){
return self::VALIDATION_TOKEN;
}
if ((float) $data->getString('operation_amount') != (float) $total_price){
if ((float) $data->getString('operation_original_amount') != (float) $total_price){
return self::VALIDATION_PRICE;
}
if ($data->getString('operation_currency') != $this->getCurrencyFromOrder($data->getString('control'))){
if ($data->getString('operation_original_currency') != $this->getCurrencyFromOrder($data->getString('control'))){
return self::VALIDATION_CURRENCY;
}
return $data->getString('operation_status');
Expand Down
8 changes: 5 additions & 3 deletions payment_dotpay.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<version>1.0</version>
<creationDate>August 2015</creationDate>
<author>Dotpay</author>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<authorEmail>galaspiotrek@gmail.com</authorEmail>
<authorUrl>dotpay</authorUrl>
<copyright>Dotpay</copyright>
<license>GNU General Public License v2 or later</license>
<description>J2STORE_DOTPAY_PAYMENT_DESC</description>
Expand All @@ -17,9 +17,11 @@
<folder>payment_dotpay</folder>
<folder>validation</folder>
</files>
<languages>
<languages folder="admin">
<language tag="en-GB">languages/en-GB.plg_j2store_payment_dotpay.ini</language>
<language tag="pl-PL">languages/pl-PL.plg_j2store_payment_dotpay.ini</language>
<language tag="en-GB">languages/en-GB.plg_j2store_payment_dotpay.sys.ini</language>
<language tag="pl-PL">languages/pl-PL.plg_j2store_payment_dotpay.sys.ini</language>
</languages>
<config>
<fields name="params">
Expand Down

0 comments on commit d35fd24

Please sign in to comment.