This module will allow you to use Dotpay payment methods for 'j2Store'. To configure the plugin its necessary to enter ID and PIN from Dotpay panel.
CONFIGURATION MODULE:
"
;PARAMS
J2STORE_PLUGIN_DOTPAY_ACCOUNTID_LABEL="Account ID"
J2STORE_PLUGIN_DOTPAY_ACCOUNTID_DESC="Account ID for Dotpay payments"
-J2STORE_PLUGIN_DOTPAY_TOKEN_LABEL="Token"
-J2STORE_PLUGIN_DOTPAY_TOKEN_DESC="Token for Dotpay payments"
+J2STORE_PLUGIN_DOTPAY_TOKEN_LABEL="PIN"
+J2STORE_PLUGIN_DOTPAY_TOKEN_DESC="PIN must be the same as in Dotpay user panel"
J2STORE_PLUGIN_DOTPAY_SANDBOX_LABEL="Sandbox"
-J2STORE_PLUGIN_DOTPAY_SANDBOX_DESC="Change from production to testing envairment"
+J2STORE_PLUGIN_DOTPAY_SANDBOX_DESC="Change from production to testing envairment. The test account is another account of production!"
J2STORE_PLUGIN_DOTPAY_SSL_LABEL="Store use HTTPS."
J2STORE_PLUGIN_DOTPAY_SSL_DESC="Mark yes, if store use SSL."
diff --git a/languages/en-GB.plg_j2store_payment_dotpay.sys.ini b/languages/en-GB.plg_j2store_payment_dotpay.sys.ini
index e2156d9..d41b065 100644
--- a/languages/en-GB.plg_j2store_payment_dotpay.sys.ini
+++ b/languages/en-GB.plg_j2store_payment_dotpay.sys.ini
@@ -1 +1,2 @@
-J2STORE_DOTPAY_PAYMENT_DESC="Dotpay payment gateway for J2Store."
\ No newline at end of file
+J2STORE_DOTPAY_PAYMENT_DESC="
+
This module will allow you to use Dotpay payment methods for VirtueMart. To configure the plugin its necessary to enter ID and PIN from Dotpay panel.
"
\ No newline at end of file
diff --git a/languages/pl-PL.plg_j2store_payment_dotpay.ini b/languages/pl-PL.plg_j2store_payment_dotpay.ini
index 2dde0b2..c650f3c 100644
--- a/languages/pl-PL.plg_j2store_payment_dotpay.ini
+++ b/languages/pl-PL.plg_j2store_payment_dotpay.ini
@@ -1,12 +1,13 @@
-J2STORE_DOTPAY_PAYMENT_DESC="System płatności dla J2Store"
+J2STORE_DOTPAY_PAYMENT_DESC="
Ten moduł pozwoli Ci na wykorzystanie metody płatności Dotpay w komponencie 'J2Store'. Niezbędne czynności do konfiguracji wtyczki to przepisanie numeru ID oraz PIN z panelu Dotpay.
KONFIGURACJA WTYCZKI:
"
;PARAMS
J2STORE_PLUGIN_DOTPAY_ACCOUNTID_LABEL="ID użytkownika"
J2STORE_PLUGIN_DOTPAY_ACCOUNTID_DESC="ID użytkownika w systemie płatności Dotpay."
-J2STORE_PLUGIN_DOTPAY_TOKEN_LABEL="Token"
-J2STORE_PLUGIN_DOTPAY_TOKEN_DESC="Token dla systemu płatności Dotpay."
+J2STORE_PLUGIN_DOTPAY_TOKEN_LABEL="PIN"
+J2STORE_PLUGIN_DOTPAY_TOKEN_DESC="PIN można odnaleźć w panelu Dotpay po zalogowaniu klikając 'Ustawienia'"
J2STORE_PLUGIN_DOTPAY_SANDBOX_LABEL="Środowisko testowe"
-J2STORE_PLUGIN_DOTPAY_SANDBOX_DESC="Zmiana środowiska z produkcyjnego na testowe."
+J2STORE_PLUGIN_DOTPAY_SANDBOX_DESC="Zmiana środowiska z produkcyjnego na testowe. Konto testowe jest odrębnym kontem od ptodukcyjnego!"
J2STORE_PLUGIN_DOTPAY_SSL_LABEL="Sklep używa HTTPS."
J2STORE_PLUGIN_DOTPAY_SSL_DESC="Zaznacz, jeśli sklep korzysta z bezpiecznego połączenia SSL."
diff --git a/languages/pl-PL.plg_j2store_payment_dotpay.sys.ini b/languages/pl-PL.plg_j2store_payment_dotpay.sys.ini
index b3cdf5b..ecfcfaf 100644
--- a/languages/pl-PL.plg_j2store_payment_dotpay.sys.ini
+++ b/languages/pl-PL.plg_j2store_payment_dotpay.sys.ini
@@ -1 +1,2 @@
-J2STORE_DOTPAY_PAYMENT_DESC="System płatności dla J2Store"
+J2STORE_DOTPAY_PAYMENT_DESC="
+
Ten moduł pozwoli Ci na wykorzystanie metody płatności Dotpay w komponencie 'J2Store'. Niezbędne czynności do konfiguracji wtyczki to przepisanie numeru ID oraz PIN z panelu Dotpay.
"
diff --git a/payment_dotpay.php b/payment_dotpay.php
index e803957..325b818 100644
--- a/payment_dotpay.php
+++ b/payment_dotpay.php
@@ -41,7 +41,7 @@ class plgJ2StorePayment_dotpay extends J2StorePaymentPlugin {
* @var array
*/
protected $_url = array(
- 0 => 'https://ssl.dotpay.pl/',
+ 0 => 'https://ssl.dotpay.pl/t2/',
1 => 'https://ssl.dotpay.pl/test_payment/'
);
@@ -113,14 +113,10 @@ public function _prePayment( $data ) {
$vars = new JObject();
$info = $this->getOrderInformation($data);
- $order = $this->getOrderByPayment($data['orderpayment_id']);
- $currency_values= $this->getCurrency($order);
-
-
//Needed for Dotpay
$vars->id = $this->params->get('accountId');
- $vars->amount = $this->getAmount($order);
- $vars->currency = $currency_values['currency_code'];
+ $vars->amount = $data['orderpayment_amount'];
+ $vars->currency = $data['order']->currency_code;
$vars->description = JText::_('J2STORE_PLUGIN_DOTPAY_ORDER') . $data['order_id'];
$vars->lang = $this->getLanguage();
$vars->api_version = $this->_default['api_version'];
@@ -231,11 +227,6 @@ private function setCompleteStatus($orderId)
$this->save($order);
}
- private function getAmount($order)
- {
- $currency_values= $this->getCurrency($order);
- return J2Store::currency()->format($order->order_total, $currency_values['currency_code'], $currency_values['currency_value'], false);
- }
/**
* This method change order status. Status is defined as $order_state_id
@@ -284,14 +275,6 @@ private function getOrder($orderId)
return $order;
}
- private function getOrderByPayment($paymentId)
- {
- F0FTable::addIncludePath ( JPATH_ADMINISTRATOR . '/components/com_j2store/tables' );
- $order = F0FTable::getInstance ( 'Order', 'J2StoreTable' );
- $order->load($paymentId);
- return $order;
- }
-
/**
* Based on status set error or ok message displaying to customer
*
@@ -340,7 +323,7 @@ private function getOrderInformation( $data ) {
private function getPrice($order_id) {
$order = $this->getOrder($order_id);
if($order){
- return $this->getAmount($order);
+ return $order->order_total;
}
return 0;
}
diff --git a/payment_dotpay.xml b/payment_dotpay.xml
index d358959..6d16d61 100644
--- a/payment_dotpay.xml
+++ b/payment_dotpay.xml
@@ -1,11 +1,11 @@
- Dotpay
- 1.0
- August 2015
+ Dotpay Payment for j2store
+ 1.1
+ 12.10.2015Dotpaygalaspiotrek@gmail.com
- dotpay
+ http://www.dotpay.pl/DotpayGNU General Public License v2 or laterJ2STORE_DOTPAY_PAYMENT_DESC
@@ -23,6 +23,9 @@
languages/en-GB.plg_j2store_payment_dotpay.sys.inilanguages/pl-PL.plg_j2store_payment_dotpay.sys.ini
+
+ dp_logo_alpha_175_50.png
+