Version Notes
In the checkout page, if the buyer chooses DebitWay Credit Card Payment option, then the buyer will be asked to enter the credit card details and a a payment request will be sent to DebitWay.
The response from DebitWay is shown to the buyer. (E.g. : if the transaction succeeded, a success message is displayed with the Transaction ID. If the transaction failed, an error message is displayed back to buyer).
Once the plug-in is installed the merchant needs to enter in the Magento panel the merchant account identifier, vericode and website unique id. Those are provided by DebitWay.
This extension can be used only with the DebitWay platform for credit cards.
Download this release
Release Info
Developer | ramya |
Extension | DebitwayCC_Creditcard |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.0.2
app/code/community/DebitwayCC/Creditcard/Model/Pay.php
CHANGED
@@ -190,7 +190,7 @@ class DebitwayCC_Creditcard_Model_Pay extends Mage_Payment_Model_Method_Cc {
|
|
190 |
private function callApi(Varien_Object $payment, $amount, $type = "")
|
191 |
{
|
192 |
|
193 |
-
|
194 |
$identifier = trim(Mage::getStoreConfig('payment/pay/identifier'));
|
195 |
$vericode = trim(Mage::getStoreConfig('payment/pay/vericode'));
|
196 |
$website_unique_id = trim(Mage::getStoreConfig('payment/pay/website_unique_id'));
|
@@ -200,7 +200,7 @@ class DebitwayCC_Creditcard_Model_Pay extends Mage_Payment_Model_Method_Cc {
|
|
200 |
|
201 |
if ($amount > 0) {
|
202 |
|
203 |
-
|
204 |
$order = $payment->getOrder();
|
205 |
$cc_number = $payment->getCcNumber();
|
206 |
$expirationMonth = $payment->getCcExpMonth();
|
@@ -210,6 +210,7 @@ class DebitwayCC_Creditcard_Model_Pay extends Mage_Payment_Model_Method_Cc {
|
|
210 |
$street = $billingAddress->getStreet(1);
|
211 |
$postcode = $billingAddress->getPostcode();
|
212 |
$cc_security_code = $payment->getCcCid();
|
|
|
213 |
|
214 |
if(strlen($expirationMonth)==1){
|
215 |
$expirationMonth = '0'.$expirationMonth;
|
@@ -241,7 +242,8 @@ class DebitwayCC_Creditcard_Model_Pay extends Mage_Payment_Model_Method_Cc {
|
|
241 |
$item_name_total .=$item_total;
|
242 |
|
243 |
}
|
244 |
-
|
|
|
245 |
|
246 |
$currency_code = $order->getBaseCurrencyCode();
|
247 |
$current_currency_code = $order->getDefaultCurrencyCode();
|
@@ -396,6 +398,7 @@ class DebitwayCC_Creditcard_Model_Pay extends Mage_Payment_Model_Method_Cc {
|
|
396 |
'shipping_zip_or_postal_code'=>$shipping_zip_or_postal_code,
|
397 |
'shipping_country'=>$shipping_country,
|
398 |
'currency'=>$currency_code,
|
|
|
399 |
'action'=>'payment'
|
400 |
);
|
401 |
|
@@ -428,7 +431,8 @@ class DebitwayCC_Creditcard_Model_Pay extends Mage_Payment_Model_Method_Cc {
|
|
428 |
|
429 |
if($type == "Authorization"){
|
430 |
|
431 |
-
|
|
|
432 |
$ch = curl_init();
|
433 |
|
434 |
curl_setopt($ch, CURLOPT_URL,$url);
|
@@ -464,19 +468,25 @@ class DebitwayCC_Creditcard_Model_Pay extends Mage_Payment_Model_Method_Cc {
|
|
464 |
'shipping_zip_or_postal_code'=>$shipping_zip_or_postal_code,
|
465 |
'shipping_country'=>$shipping_country,
|
466 |
'currency'=>$currency_code,
|
|
|
467 |
'action'=>'authorized payment'
|
468 |
);
|
|
|
|
|
469 |
|
470 |
$fields_string = http_build_query($post_data);
|
471 |
|
472 |
curl_setopt ($ch, CURLOPT_POSTFIELDS, $fields_string);
|
473 |
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
|
474 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
475 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
|
|
476 |
$result = curl_exec($ch);
|
477 |
|
|
|
478 |
curl_close($ch);
|
479 |
-
|
|
|
480 |
|
481 |
$approved = false;
|
482 |
$output = $this->get_value_from_response($result,'result');
|
190 |
private function callApi(Varien_Object $payment, $amount, $type = "")
|
191 |
{
|
192 |
|
193 |
+
|
194 |
$identifier = trim(Mage::getStoreConfig('payment/pay/identifier'));
|
195 |
$vericode = trim(Mage::getStoreConfig('payment/pay/vericode'));
|
196 |
$website_unique_id = trim(Mage::getStoreConfig('payment/pay/website_unique_id'));
|
200 |
|
201 |
if ($amount > 0) {
|
202 |
|
203 |
+
|
204 |
$order = $payment->getOrder();
|
205 |
$cc_number = $payment->getCcNumber();
|
206 |
$expirationMonth = $payment->getCcExpMonth();
|
210 |
$street = $billingAddress->getStreet(1);
|
211 |
$postcode = $billingAddress->getPostcode();
|
212 |
$cc_security_code = $payment->getCcCid();
|
213 |
+
$ip_address = $order->getRemoteIp();
|
214 |
|
215 |
if(strlen($expirationMonth)==1){
|
216 |
$expirationMonth = '0'.$expirationMonth;
|
242 |
$item_name_total .=$item_total;
|
243 |
|
244 |
}
|
245 |
+
|
246 |
+
$grandTotal1 = number_format($order->getBaseGrandTotal(), 2, '.', '');
|
247 |
|
248 |
$currency_code = $order->getBaseCurrencyCode();
|
249 |
$current_currency_code = $order->getDefaultCurrencyCode();
|
398 |
'shipping_zip_or_postal_code'=>$shipping_zip_or_postal_code,
|
399 |
'shipping_country'=>$shipping_country,
|
400 |
'currency'=>$currency_code,
|
401 |
+
'ip_address'=>$ip_address,
|
402 |
'action'=>'payment'
|
403 |
);
|
404 |
|
431 |
|
432 |
if($type == "Authorization"){
|
433 |
|
434 |
+
|
435 |
+
|
436 |
$ch = curl_init();
|
437 |
|
438 |
curl_setopt($ch, CURLOPT_URL,$url);
|
468 |
'shipping_zip_or_postal_code'=>$shipping_zip_or_postal_code,
|
469 |
'shipping_country'=>$shipping_country,
|
470 |
'currency'=>$currency_code,
|
471 |
+
'ip_address'=>$ip_address,
|
472 |
'action'=>'authorized payment'
|
473 |
);
|
474 |
+
|
475 |
+
|
476 |
|
477 |
$fields_string = http_build_query($post_data);
|
478 |
|
479 |
curl_setopt ($ch, CURLOPT_POSTFIELDS, $fields_string);
|
480 |
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
|
481 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
482 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
|
483 |
+
|
484 |
$result = curl_exec($ch);
|
485 |
|
486 |
+
|
487 |
curl_close($ch);
|
488 |
+
|
489 |
+
|
490 |
|
491 |
$approved = false;
|
492 |
$output = $this->get_value_from_response($result,'result');
|
app/etc/modules/DebitwayCC_Creditcard.xml
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<DebitwayCC_Creditcard>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>community</codePool>
|
7 |
-
<depends>
|
8 |
-
<Mage_Payment />
|
9 |
-
</depends>
|
10 |
-
</DebitwayCC_Creditcard>
|
11 |
-
</modules>
|
12 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,39 +1,28 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DebitwayCC_Creditcard</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
-
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>This is an extension which can be used for Credit Card Payment Method with DebitWay. It adds 'DebitWay Credit Card Payment Module' as a payment method during checkout
|
10 |
-
|
11 |
-
|
12 |
-

|
13 |
-
Features:
|
14 |
-
· Payment Options provided are - Payment, Authorized payment, Capture, Refund and Decline.
|
15 |
-
· Easy and flexible.
|
16 |
-
· Provide Secure, Trusted and Fast payment to your buyers.
|
17 |
-
· Fully open source and easy to use.
|
18 |
-
· Enable/disable payment method from admin panel.
|
19 |
-
· Proper error messages are displayed to guide your buyers.
|
20 |
-
· Independent of other plugins.
|
21 |

|
22 |
-
|
23 |
-
|
24 |
-

|
25 |
-
In the checkout page, if the buyer chooses DebitWay Credit Card Payment option, then the buyer will be asked to enter the credit card details and a a payment request will be sent to DebitWay. 
|
26 |

|
27 |
The response from DebitWay is shown to the buyer. (E.g. : if the transaction succeeded, a success message is displayed with the Transaction ID. If the transaction failed, an error message is displayed back to buyer).
|
28 |

|
29 |
Once the plug-in is installed the merchant needs to enter in the Magento panel the merchant account identifier, vericode and website unique id. Those are provided by DebitWay.
|
30 |

|
31 |
-
|
32 |
-
|
33 |
-
<authors><author><name>
|
34 |
-
<date>2015-
|
35 |
-
<time>
|
36 |
-
<contents><target name="magecommunity"><dir name="DebitwayCC"><dir name="Creditcard"><dir name="Block"><dir name="Form"><file name="Pay.php" hash="d4f3ef8fab1defffee9fb2f5e925ad77"/></dir><dir name="Info"><file name="Pay.php" hash="38f5fd149883267bee345d98abedfb98"/></dir></dir><dir name="Helper"><file name="Data.php" hash="fa1e42e8278b9a11dd4c3c86cbc62c2f"/></dir><dir name="Model"><file name="Pay.php" hash="
|
37 |
<compatible/>
|
38 |
-
<dependencies><required><php><min>5.
|
39 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DebitwayCC_Creditcard</name>
|
4 |
+
<version>2.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">The Open Software License 3.0 (OSL-3.0)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>This is an extension which can be used for Credit Card Payment Method with DebitWay. It adds 'DebitWay Credit Card Payment Module' as a payment method during checkout.
|
10 |
+
</summary>
|
11 |
+
<description>Credit Card Plugin:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |

|
13 |
+
The plug-in integrates with DebitWay platform hence making easy for merchants to connect with DebitWay. Merchants have nothing else to do but install this extension, configure it and start processing transactions.</description>
|
14 |
+
<notes>In the checkout page, if the buyer chooses DebitWay Credit Card Payment option, then the buyer will be asked to enter the credit card details and a a payment request will be sent to DebitWay.
|
|
|
|
|
15 |

|
16 |
The response from DebitWay is shown to the buyer. (E.g. : if the transaction succeeded, a success message is displayed with the Transaction ID. If the transaction failed, an error message is displayed back to buyer).
|
17 |

|
18 |
Once the plug-in is installed the merchant needs to enter in the Magento panel the merchant account identifier, vericode and website unique id. Those are provided by DebitWay.
|
19 |

|
20 |
+

|
21 |
+
This extension can be used only with the DebitWay platform for credit cards.</notes>
|
22 |
+
<authors><author><name>ramya</name><user>tech4</user><email>ramya@debitway.ca</email></author></authors>
|
23 |
+
<date>2015-10-21</date>
|
24 |
+
<time>15:49:33</time>
|
25 |
+
<contents><target name="magecommunity"><dir name="DebitwayCC"><dir name="Creditcard"><dir name="Block"><dir name="Form"><file name="Pay.php" hash="d4f3ef8fab1defffee9fb2f5e925ad77"/></dir><dir name="Info"><file name="Pay.php" hash="38f5fd149883267bee345d98abedfb98"/></dir></dir><dir name="Helper"><file name="Data.php" hash="fa1e42e8278b9a11dd4c3c86cbc62c2f"/></dir><dir name="Model"><file name="Pay.php" hash="a91ef4006942b5483b0f069e2116fdee"/><dir name="Source"><file name="Action.php" hash="bf50491a440da1fb423f250c11e446ea"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="9a9b8a5bfbd60699499f73a1497c33f0"/></dir><dir name="etc"><file name="config.xml" hash="dfb34b49370888933ab399ec3d54a532"/><file name="system.xml" hash="ee77e408b718164063f4a810f93b1ce4"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="DebitwayCC_Creditcard" hash=""/></dir></target></contents>
|
26 |
<compatible/>
|
27 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
28 |
</package>
|