Version Notes
Added Dwolla error reporting service. This provides Dwolla with non-sensitive data in the event of a fatal error, making it easier for Dwolla to help troubleshoot this extension.
Download this release
Release Info
Developer | Michael Schonfeld |
Extension | DwollaPaymentModule |
Version | 3.0.1 |
Comparing to | |
See all releases |
Code changes from version 3.0.0 to 3.0.1
- app/code/local/Dwolla/.DS_Store +0 -0
- app/code/local/Dwolla/DwollaPaymentModule/.DS_Store +0 -0
- app/code/local/Dwolla/DwollaPaymentModule/Block/Form.php +1 -1
- app/code/local/Dwolla/DwollaPaymentModule/Helper/Data.php +1 -1
- app/code/local/Dwolla/DwollaPaymentModule/Model/Standard.php +1 -1
- app/code/local/Dwolla/DwollaPaymentModule/controllers/PaymentController.php +2 -2
- app/code/local/Dwolla/DwollaPaymentModule/etc/config.xml +1 -1
- app/code/local/Dwolla/DwollaPaymentModule/sql/.DS_Store +0 -0
- app/code/local/Dwolla/DwollaPaymentModule/sql/DwollaPaymentModule_setup/mysql4-install-0.1.0.php +0 -18
- app/code/local/Dwolla/DwollaPaymentModule/sql/DwollaPaymentModule_setup/mysql4-install-3.0.0.php +0 -28
- app/design/frontend/base/default/template/dwollaPaymentModule/redirect.phtml +26 -1
- package.xml +5 -5
app/code/local/Dwolla/.DS_Store
DELETED
Binary file
|
app/code/local/Dwolla/DwollaPaymentModule/.DS_Store
DELETED
Binary file
|
app/code/local/Dwolla/DwollaPaymentModule/Block/Form.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @package Dwolla_DwollaPaymentModule
|
7 |
* @copyright Copyright (c) 2012 Dwolla Inc. (http://www.dwolla.com)
|
8 |
* @autor Gordon Zheng <gordon@dwolla.com>, Michael Schonfeld <michael@dwolla.com>
|
9 |
-
* @version 3.0.
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
|
6 |
* @package Dwolla_DwollaPaymentModule
|
7 |
* @copyright Copyright (c) 2012 Dwolla Inc. (http://www.dwolla.com)
|
8 |
* @autor Gordon Zheng <gordon@dwolla.com>, Michael Schonfeld <michael@dwolla.com>
|
9 |
+
* @version 3.0.1
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
|
app/code/local/Dwolla/DwollaPaymentModule/Helper/Data.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @package Dwolla_DwollaPaymentModule
|
7 |
* @copyright Copyright (c) 2012 Dwolla Inc. (http://www.dwolla.com)
|
8 |
* @autor Gordon Zheng <gordon@dwolla.com>, Michael Schonfeld <michael@dwolla.com>
|
9 |
-
* @version 3.0.
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
|
6 |
* @package Dwolla_DwollaPaymentModule
|
7 |
* @copyright Copyright (c) 2012 Dwolla Inc. (http://www.dwolla.com)
|
8 |
* @autor Gordon Zheng <gordon@dwolla.com>, Michael Schonfeld <michael@dwolla.com>
|
9 |
+
* @version 3.0.1
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
|
app/code/local/Dwolla/DwollaPaymentModule/Model/Standard.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @package Dwolla_DwollaPaymentModule
|
7 |
* @copyright Copyright (c) 2012 Dwolla Inc. (http://www.dwolla.com)
|
8 |
* @autor Gordon Zheng <gordon@dwolla.com>, Michael Schonfeld <michael@dwolla.com>
|
9 |
-
* @version 3.0.
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
|
6 |
* @package Dwolla_DwollaPaymentModule
|
7 |
* @copyright Copyright (c) 2012 Dwolla Inc. (http://www.dwolla.com)
|
8 |
* @autor Gordon Zheng <gordon@dwolla.com>, Michael Schonfeld <michael@dwolla.com>
|
9 |
+
* @version 3.0.1
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
|
app/code/local/Dwolla/DwollaPaymentModule/controllers/PaymentController.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @package Dwolla_DwollaPaymentModule
|
7 |
* @copyright Copyright (c) 2012 Dwolla Inc. (http://www.dwolla.com)
|
8 |
* @autor Gordon Zheng <gordon@dwolla.com>, Michael Schonfeld <michael@dwolla.com>
|
9 |
-
* @version 3.0.
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
|
@@ -95,7 +95,7 @@ class Dwolla_DwollaPaymentModule_PaymentController extends Mage_Core_Controller_
|
|
95 |
$orderId = $this->getRequest()->orderId;
|
96 |
$checkoutId = $this->getRequest()->checkoutId;
|
97 |
$transactionId = $this->getRequest()->transaction;
|
98 |
-
$amount = $this->getRequest()->amount;
|
99 |
$signature = $this->getRequest()->signature;
|
100 |
|
101 |
// Check if the user cancelled, or
|
6 |
* @package Dwolla_DwollaPaymentModule
|
7 |
* @copyright Copyright (c) 2012 Dwolla Inc. (http://www.dwolla.com)
|
8 |
* @autor Gordon Zheng <gordon@dwolla.com>, Michael Schonfeld <michael@dwolla.com>
|
9 |
+
* @version 3.0.1
|
10 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
11 |
*/
|
12 |
|
95 |
$orderId = $this->getRequest()->orderId;
|
96 |
$checkoutId = $this->getRequest()->checkoutId;
|
97 |
$transactionId = $this->getRequest()->transaction;
|
98 |
+
$amount = number_format($this->getRequest()->amount, 2);
|
99 |
$signature = $this->getRequest()->signature;
|
100 |
|
101 |
// Check if the user cancelled, or
|
app/code/local/Dwolla/DwollaPaymentModule/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Dwolla_DwollaPaymentModule>
|
5 |
-
<version>3.0.
|
6 |
</Dwolla_DwollaPaymentModule>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Dwolla_DwollaPaymentModule>
|
5 |
+
<version>3.0.1</version>
|
6 |
</Dwolla_DwollaPaymentModule>
|
7 |
</modules>
|
8 |
<global>
|
app/code/local/Dwolla/DwollaPaymentModule/sql/.DS_Store
DELETED
Binary file
|
app/code/local/Dwolla/DwollaPaymentModule/sql/DwollaPaymentModule_setup/mysql4-install-0.1.0.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
$installer = new Mage_Sales_Model_Mysql4_Setup;
|
2 |
-
$installer->startSetup();
|
3 |
-
$attribute = array(
|
4 |
-
'type' => 'text',
|
5 |
-
'backend_type' => 'text',
|
6 |
-
'frontend_input' => 'text',
|
7 |
-
'is_user_defined' => true,
|
8 |
-
'label' => 'Transaction Id',
|
9 |
-
'visible' => true,
|
10 |
-
'required' => false,
|
11 |
-
'user_defined' => false,
|
12 |
-
'searchable' => false,
|
13 |
-
'filterable' => false,
|
14 |
-
'comparable' => false,
|
15 |
-
'default' => ''
|
16 |
-
);
|
17 |
-
$installer->addAttribute('order', 'transaction_id', $attribute);
|
18 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Dwolla/DwollaPaymentModule/sql/DwollaPaymentModule_setup/mysql4-install-3.0.0.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$installer = new Mage_Sales_Model_Mysql4_Setup;
|
3 |
-
|
4 |
-
$installer->startSetup();
|
5 |
-
|
6 |
-
$attribute = array(
|
7 |
-
'type' => 'text',
|
8 |
-
'backend_type' => 'text',
|
9 |
-
'frontend_input' => 'text',
|
10 |
-
'is_user_defined' => true,
|
11 |
-
'label' => 'Dwolla Transaction ID',
|
12 |
-
'visible' => true,
|
13 |
-
'required' => false,
|
14 |
-
'user_defined' => false,
|
15 |
-
'searchable' => true,
|
16 |
-
'filterable' => true,
|
17 |
-
'comparable' => false,
|
18 |
-
'default' => ''
|
19 |
-
);
|
20 |
-
$installer->addAttribute('order', 'dwolla_transaction_id', $attribute);
|
21 |
-
|
22 |
-
$status = Mage::getModel('sales/order_status');
|
23 |
-
|
24 |
-
$status->setStatus('payment_complete')->setLabel('Payment Complete')
|
25 |
-
->assignState('payment_complete') //for example, use any available existing state
|
26 |
-
->save();
|
27 |
-
|
28 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/dwollaPaymentModule/redirect.phtml
CHANGED
@@ -66,7 +66,7 @@ $dwollaJson = array(
|
|
66 |
)
|
67 |
);
|
68 |
|
69 |
-
$ch = curl_init("https://www.dwolla.com/payment/
|
70 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
|
71 |
curl_setopt($ch, CURLOPT_POST, 1);
|
72 |
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($dwollaJson));
|
@@ -76,6 +76,31 @@ curl_close($ch);
|
|
76 |
|
77 |
// Make sure we got a checkout ID
|
78 |
if(!$output['CheckoutId']) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
$debug = print_r($dwollaJson, TRUE);
|
80 |
$message = "Something went wrong while redirecting the customer to Dwolla's gateway. Here's what Dwolla said: {$output['Message']} ... Contact support@dwolla.com with the following information: Debug information: {$debug}";
|
81 |
$order->setState(Mage_Sales_Model_Order::STATE_HOLDED, true, $message);
|
66 |
)
|
67 |
);
|
68 |
|
69 |
+
$ch = curl_init("https://www.dwolla.com/payment/requesttt");
|
70 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
|
71 |
curl_setopt($ch, CURLOPT_POST, 1);
|
72 |
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($dwollaJson));
|
76 |
|
77 |
// Make sure we got a checkout ID
|
78 |
if(!$output['CheckoutId']) {
|
79 |
+
$post_request = $dwollaJson;
|
80 |
+
// remove secret from post request dump:
|
81 |
+
unset($post_request['secret']);
|
82 |
+
|
83 |
+
// notify Dwolla's error logging server of this fatal error:
|
84 |
+
$errorJson = array(
|
85 |
+
'request' => json_encode($post_request),
|
86 |
+
'response' => json_encode($output),
|
87 |
+
'orderId' => json_encode($magOrderId),
|
88 |
+
'platform' => 'Magento'
|
89 |
+
);
|
90 |
+
|
91 |
+
echo $errorJson['response'];
|
92 |
+
echo $errorJson['orderId'];
|
93 |
+
echo $errorJson['platform'];
|
94 |
+
|
95 |
+
$ch = curl_init('http://redalert.dwollalabs.com');
|
96 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
|
97 |
+
curl_setopt($ch, CURLOPT_POST, 1);
|
98 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($errorJson));
|
99 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
100 |
+
$errlog = curl_exec($ch);
|
101 |
+
curl_close($ch);
|
102 |
+
|
103 |
+
// log error in order details:
|
104 |
$debug = print_r($dwollaJson, TRUE);
|
105 |
$message = "Something went wrong while redirecting the customer to Dwolla's gateway. Here's what Dwolla said: {$output['Message']} ... Contact support@dwolla.com with the following information: Debug information: {$debug}";
|
106 |
$order->setState(Mage_Sales_Model_Order::STATE_HOLDED, true, $message);
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DwollaPaymentModule</name>
|
4 |
-
<version>3.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>MIT License</license>
|
7 |
<channel>community</channel>
|
@@ -18,11 +18,11 @@ A customer must have a Dwolla account to pay with Dwolla. Dwolla accounts are fr
|
|
18 |
Dwolla is available for U.S. residents and bank accounts only.
|
19 |

|
20 |
https://www.dwolla.com</description>
|
21 |
-
<notes>Added
|
22 |
<authors><author><name>Michael Schonfeld</name><user>dwolla</user><email>api@dwolla.com</email></author><author><name>Gordon Zheng</name><user>gordon-dwolla</user><email>gordon@dwolla.com</email></author></authors>
|
23 |
-
<date>2013-
|
24 |
-
<time>
|
25 |
-
<contents><target name="magelocal"><dir name="Dwolla"><dir name="DwollaPaymentModule"><dir name="Block"><file name="Form.php" hash="
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
28 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>DwollaPaymentModule</name>
|
4 |
+
<version>3.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>MIT License</license>
|
7 |
<channel>community</channel>
|
18 |
Dwolla is available for U.S. residents and bank accounts only.
|
19 |

|
20 |
https://www.dwolla.com</description>
|
21 |
+
<notes>Added Dwolla error reporting service. This provides Dwolla with non-sensitive data in the event of a fatal error, making it easier for Dwolla to help troubleshoot this extension.</notes>
|
22 |
<authors><author><name>Michael Schonfeld</name><user>dwolla</user><email>api@dwolla.com</email></author><author><name>Gordon Zheng</name><user>gordon-dwolla</user><email>gordon@dwolla.com</email></author></authors>
|
23 |
+
<date>2013-05-06</date>
|
24 |
+
<time>06:48:13</time>
|
25 |
+
<contents><target name="magelocal"><dir name="Dwolla"><dir name="DwollaPaymentModule"><dir name="Block"><file name="Form.php" hash="6f5ab3b7fd01b4fb23fd070aa2ef6db1"/></dir><dir name="Helper"><file name="Data.php" hash="1e25ef5e4e2b23b8884e4e872045240e"/></dir><dir name="Model"><file name="Standard.php" hash="56e5412e976eb8063056b1a9300ff3d4"/></dir><dir name="controllers"><file name="PaymentController.php" hash="0093c16d89ce2d2dfd974ae08645aada"/></dir><dir name="etc"><file name="config.xml" hash="6293180d951a1aa54e35dac4ba97de79"/><file name="system.xml" hash="57b24b47592310af9df586bb4d1d205f"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="dwollaPaymentModule"><file name="form.phtml" hash="9d3aef1a028d0da1d151c3f11e65bff1"/><file name="redirect.phtml" hash="121c44ae081bd6a2dee129f53e6e7535"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Dwolla_DwollaPaymentModule.xml" hash="61871f4d96d1ff4bad1ab6e8f4f97ac5"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="dwollaPaymentModule"><dir name="default"><file name="dwolla-sm-no-bg.png" hash="a53703a5bd77615ad0c18e2e71d72311"/></dir></dir></dir></target></contents>
|
26 |
<compatible/>
|
27 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
28 |
</package>
|