paymentwall_magento_module - Version 1.2.1

Version Notes

* Update latest library.
* Add Recurring Profile support

Download this release

Release Info

Developer Paymentwall
Extension paymentwall_magento_module
Version 1.2.1
Comparing to
See all releases


Code changes from version 1.2.0 to 1.2.1

app/code/community/Paymentwall/Paymentwall/Model/Method/Pwbrick.php CHANGED
@@ -70,10 +70,20 @@ class Paymentwall_Paymentwall_Model_Method_Pwbrick extends Paymentwall_Paymentwa
70
 
71
  $this->initPaymentwallConfig();
72
 
 
 
 
 
 
 
 
73
  $charge = new Paymentwall_Charge();
74
  $charge->create(array_merge(
75
  $this->prepareUserProfile($payment->getOrder()), // for User Profile API
76
- $this->prepareCardInfo($payment)
 
 
 
77
  ));
78
  $response = $charge->getPublicData();
79
 
70
 
71
  $this->initPaymentwallConfig();
72
 
73
+ $customerId = $_SERVER['REMOTE_ADDR'];
74
+
75
+ if(Mage::getSingleton('customer/session')->isLoggedIn()){
76
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
77
+ $customerId = $customer->getId();
78
+ }
79
+
80
  $charge = new Paymentwall_Charge();
81
  $charge->create(array_merge(
82
  $this->prepareUserProfile($payment->getOrder()), // for User Profile API
83
+ $this->prepareCardInfo($payment),
84
+ array(
85
+ 'uid' => $customerId // for Pingback Request
86
+ )
87
  ));
88
  $response = $charge->getPublicData();
89
 
app/code/community/Paymentwall/Paymentwall/Model/Method/Pwlocal.php CHANGED
@@ -29,8 +29,15 @@ class Paymentwall_Paymentwall_Model_Method_Pwlocal extends Paymentwall_Paymentwa
29
  public function getPaymentWidget(Mage_Sales_Model_Order $order) {
30
  $this->initPaymentwallConfig();
31
 
 
 
 
 
 
 
 
32
  $widget = new Paymentwall_Widget(
33
- $order->getCustomerEmail(),
34
  $this->getConfigData('paymentwall_widget_code'),
35
  array(
36
  new Paymentwall_Product(
29
  public function getPaymentWidget(Mage_Sales_Model_Order $order) {
30
  $this->initPaymentwallConfig();
31
 
32
+ $customerId = $_SERVER['REMOTE_ADDR'];
33
+
34
+ if(Mage::getSingleton('customer/session')->isLoggedIn()){
35
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
36
+ $customerId = $customer->getId();
37
+ }
38
+
39
  $widget = new Paymentwall_Widget(
40
+ $customerId,
41
  $this->getConfigData('paymentwall_widget_code'),
42
  array(
43
  new Paymentwall_Product(
app/code/community/Paymentwall/Paymentwall/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Paymentwall_Paymentwall>
5
- <version>1.2.0</version>
6
  </Paymentwall_Paymentwall>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <Paymentwall_Paymentwall>
5
+ <version>1.2.1</version>
6
  </Paymentwall_Paymentwall>
7
  </modules>
8
  <frontend>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>paymentwall_magento_module</name>
4
- <version>1.2.0</version>
5
  <stability>stable</stability>
6
  <license>MITL</license>
7
  <channel>community</channel>
@@ -12,9 +12,9 @@
12
  <notes>* Update latest library.&#xD;
13
  * Add Recurring Profile support</notes>
14
  <authors><author><name>Paymentwall</name><user>platforms</user><email>platforms@paymentwall.com</email></author></authors>
15
- <date>2015-12-04</date>
16
- <time>08:02:23</time>
17
- <contents><target name="magecommunity"><dir name="Paymentwall"><dir name="Paymentwall"><dir name="Block"><dir name="Checkout"><dir name="Form"><dir name="Method"><file name="Abstract.php" hash="de9bfa933a6e1757c3bab53768ec4d62"/><file name="Pwbrick.php" hash="c01cabde8670bdff801534fe283b0534"/><file name="Pwlocal.php" hash="2d4a1fb4fdfcaaf5d7cf72eae4231965"/></dir></dir><dir name="Info"><dir name="Method"><file name="Pwbrick.php" hash="4d8bc2a37e04c180896a708dabf9cfa7"/><file name="Pwlocal.php" hash="52d3d7580cbdcc8bf0f98834b9a9e5a0"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="4270b082a8264e63f6a82228b3e2c1d2"/></dir><dir name="Model"><dir name="Method"><file name="Abstract.php" hash="9eecab8a827575d3b0ab149d0ab72d46"/><file name="Pwbrick.php" hash="7d0c589cf2b3ffdcd61b2c423c20d631"/><file name="Pwlocal.php" hash="1caba151445220b8cfa8ff17e149b525"/></dir><file name="Pingback.php" hash="ee609fd506ff00241c91191341fc2464"/></dir><dir name="controllers"><file name="PaymentController.php" hash="6d576fabeef93bc1e36a1dad97a26f9c"/></dir><dir name="etc"><file name="config.xml" hash="2a8c907edd7a48db8143da469a258046"/><file name="system.xml" hash="82abac90b5d8edf1b47e72135245b2ea"/></dir></dir></dir></target><target name="magelib"><dir name="paymentwall-php"><file name="LICENSE" hash="001561189374b83bcd6bc7f962daee8a"/><file name="README.md" hash="04122bf55fe20b9954feb14817435da2"/><file name="composer.json" hash="4e7035c64f2d74ba0a5f5cf80effe45e"/><dir name="features"><dir name="bootstrap"><file name="ChargeContext.php" hash="f1d0604f2fc16dd5932535f9c24995a3"/><file name="FeatureContext.php" hash="146d6e79c6704cfb24ee6f2a7b7fba5a"/><file name="PingbackContext.php" hash="b6c86d8f3c9caa21435f47ddb2d5add1"/><file name="WidgetContext.php" hash="70c8d608eb407e346467c2a8f7162732"/></dir><file name="charge.feature" hash="04258fc641535794c48c6c55aad7f94f"/><file name="pingback.feature" hash="05869da8a3e36b6bec0293a22c1a9235"/><file name="widget.feature" hash="198999d8bf357de175f3268cc88337f6"/></dir><dir name="lib"><dir name="Paymentwall"><file name="ApiObject.php" hash="e6ba4d0c3b93adf84ae5819fddecf26c"/><file name="ApiObjectInterface.php" hash="4922ff334356aac33a5b159f8d001b93"/><file name="Base.php" hash="9bdae1c385327dadbd0ca5c9bbbe6107"/><file name="Card.php" hash="d8aa72a3e8ea0cdd132867164c8352c1"/><file name="Charge.php" hash="0ca04683046e9abdf3968f495db625c4"/><file name="Config.php" hash="9253f2afd5523653dd9e5fce2afc15c4"/><file name="GenerericApiObject.php" hash="6016e500c2c6736048c2f27ae8924a1c"/><file name="HttpAction.php" hash="555295426227f26733b7736692345667"/><file name="Instance.php" hash="86422afa5d43aac945021ef694b9bbc1"/><file name="OneTimeToken.php" hash="e3b9c56c34920c9b5ea53609d95acb3b"/><file name="Pingback.php" hash="a77fb2f158a60ab48af4d9f420a22894"/><file name="Product.php" hash="8b382cb28b68f77c9784e5dbc40512cb"/><dir name="Response"><file name="Abstract.php" hash="f59033acb9e14fa7a90cc2f812b6970c"/><file name="Error.php" hash="4554a0b337a2748221fb7dfae2daa8c2"/><file name="Factory.php" hash="7036d21f4682b505d5b1ff04ec79e355"/><file name="Interface.php" hash="e75f22329b3c8cbdf389aee8366ceaf3"/><file name="Success.php" hash="1f3c6c58b4273eadff5ef4b482b65187"/></dir><dir name="Signature"><file name="Abstract.php" hash="dea8f9c03b02db7462d276e3611a3a98"/><file name="Pingback.php" hash="1ab1e00037d395f9bc55bea929397927"/><file name="Widget.php" hash="2e1e2a712a0eca4f54f834838df51a59"/></dir><file name="Subscription.php" hash="7110f0292dbe01e4bc1517b5cc206ed2"/><file name="Widget.php" hash="6a91e8c0f4fe930facde52c2750824da"/></dir><file name="paymentwall.php" hash="6f4ee78ffb0677d2a49d2417dae2c038"/></dir><file name=".git" hash="50da8e1bb8ed3a4d1e1413fe2d6c0d68"/><file name=".gitignore" hash="d22fe2936066c576100994c62f32761e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="paymentwall.css" hash="408b3eb269441b27d262c3abc6da78f3"/></dir><dir name="js"><file name="paymentwall.js" hash="d10a03a2130a5cdb87106a3eaa0cd30a"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="paymentwall.xml" hash="15713872f2239c9b3cb615291b36e54b"/></dir><dir name="template"><dir name="paymentwall"><dir name="checkout"><dir name="form"><dir name="method"><file name="pwbrick.phtml" hash="95f073505e84b3c75607ff52538c01c7"/><file name="pwlocal.phtml" hash="b964770e54bb91fca23a49951e3c744c"/></dir></dir><dir name="info"><dir name="method"><file name="pwbrick.phtml" hash="b23472e15332c427456e9d92619eecff"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Paymentwall_Paymentwall.xml" hash="a5ef063119f4c0d274cc2f7a72699538"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>paymentwall_magento_module</name>
4
+ <version>1.2.1</version>
5
  <stability>stable</stability>
6
  <license>MITL</license>
7
  <channel>community</channel>
12
  <notes>* Update latest library.&#xD;
13
  * Add Recurring Profile support</notes>
14
  <authors><author><name>Paymentwall</name><user>platforms</user><email>platforms@paymentwall.com</email></author></authors>
15
+ <date>2015-12-07</date>
16
+ <time>09:27:38</time>
17
+ <contents><target name="magecommunity"><dir name="Paymentwall"><dir name="Paymentwall"><dir name="Block"><dir name="Checkout"><dir name="Form"><dir name="Method"><file name="Abstract.php" hash="de9bfa933a6e1757c3bab53768ec4d62"/><file name="Pwbrick.php" hash="c01cabde8670bdff801534fe283b0534"/><file name="Pwlocal.php" hash="2d4a1fb4fdfcaaf5d7cf72eae4231965"/></dir></dir><dir name="Info"><dir name="Method"><file name="Pwbrick.php" hash="4d8bc2a37e04c180896a708dabf9cfa7"/><file name="Pwlocal.php" hash="52d3d7580cbdcc8bf0f98834b9a9e5a0"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="4270b082a8264e63f6a82228b3e2c1d2"/></dir><dir name="Model"><dir name="Method"><file name="Abstract.php" hash="9eecab8a827575d3b0ab149d0ab72d46"/><file name="Pwbrick.php" hash="5157daf62c1b38b80a6761115427e05a"/><file name="Pwlocal.php" hash="9150d3bb94cd527177bf647d5804b6f6"/></dir><file name="Pingback.php" hash="ee609fd506ff00241c91191341fc2464"/></dir><dir name="controllers"><file name="PaymentController.php" hash="6d576fabeef93bc1e36a1dad97a26f9c"/></dir><dir name="etc"><file name="config.xml" hash="272273074dd025d48eb23232f7bdacd7"/><file name="system.xml" hash="82abac90b5d8edf1b47e72135245b2ea"/></dir></dir></dir></target><target name="magelib"><dir name="paymentwall-php"><file name="LICENSE" hash="001561189374b83bcd6bc7f962daee8a"/><file name="README.md" hash="04122bf55fe20b9954feb14817435da2"/><file name="composer.json" hash="4e7035c64f2d74ba0a5f5cf80effe45e"/><dir name="features"><dir name="bootstrap"><file name="ChargeContext.php" hash="f1d0604f2fc16dd5932535f9c24995a3"/><file name="FeatureContext.php" hash="146d6e79c6704cfb24ee6f2a7b7fba5a"/><file name="PingbackContext.php" hash="b6c86d8f3c9caa21435f47ddb2d5add1"/><file name="WidgetContext.php" hash="70c8d608eb407e346467c2a8f7162732"/></dir><file name="charge.feature" hash="04258fc641535794c48c6c55aad7f94f"/><file name="pingback.feature" hash="05869da8a3e36b6bec0293a22c1a9235"/><file name="widget.feature" hash="198999d8bf357de175f3268cc88337f6"/></dir><dir name="lib"><dir name="Paymentwall"><file name="ApiObject.php" hash="e6ba4d0c3b93adf84ae5819fddecf26c"/><file name="ApiObjectInterface.php" hash="4922ff334356aac33a5b159f8d001b93"/><file name="Base.php" hash="9bdae1c385327dadbd0ca5c9bbbe6107"/><file name="Card.php" hash="d8aa72a3e8ea0cdd132867164c8352c1"/><file name="Charge.php" hash="0ca04683046e9abdf3968f495db625c4"/><file name="Config.php" hash="9253f2afd5523653dd9e5fce2afc15c4"/><file name="GenerericApiObject.php" hash="6016e500c2c6736048c2f27ae8924a1c"/><file name="HttpAction.php" hash="555295426227f26733b7736692345667"/><file name="Instance.php" hash="86422afa5d43aac945021ef694b9bbc1"/><file name="OneTimeToken.php" hash="e3b9c56c34920c9b5ea53609d95acb3b"/><file name="Pingback.php" hash="a77fb2f158a60ab48af4d9f420a22894"/><file name="Product.php" hash="8b382cb28b68f77c9784e5dbc40512cb"/><dir name="Response"><file name="Abstract.php" hash="f59033acb9e14fa7a90cc2f812b6970c"/><file name="Error.php" hash="4554a0b337a2748221fb7dfae2daa8c2"/><file name="Factory.php" hash="7036d21f4682b505d5b1ff04ec79e355"/><file name="Interface.php" hash="e75f22329b3c8cbdf389aee8366ceaf3"/><file name="Success.php" hash="1f3c6c58b4273eadff5ef4b482b65187"/></dir><dir name="Signature"><file name="Abstract.php" hash="dea8f9c03b02db7462d276e3611a3a98"/><file name="Pingback.php" hash="1ab1e00037d395f9bc55bea929397927"/><file name="Widget.php" hash="2e1e2a712a0eca4f54f834838df51a59"/></dir><file name="Subscription.php" hash="7110f0292dbe01e4bc1517b5cc206ed2"/><file name="Widget.php" hash="6a91e8c0f4fe930facde52c2750824da"/></dir><file name="paymentwall.php" hash="6f4ee78ffb0677d2a49d2417dae2c038"/></dir><file name=".git" hash="50da8e1bb8ed3a4d1e1413fe2d6c0d68"/><file name=".gitignore" hash="d22fe2936066c576100994c62f32761e"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="paymentwall.css" hash="408b3eb269441b27d262c3abc6da78f3"/></dir><dir name="js"><file name="paymentwall.js" hash="d10a03a2130a5cdb87106a3eaa0cd30a"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="paymentwall.xml" hash="15713872f2239c9b3cb615291b36e54b"/></dir><dir name="template"><dir name="paymentwall"><dir name="checkout"><dir name="form"><dir name="method"><file name="pwbrick.phtml" hash="95f073505e84b3c75607ff52538c01c7"/><file name="pwlocal.phtml" hash="b964770e54bb91fca23a49951e3c744c"/></dir></dir><dir name="info"><dir name="method"><file name="pwbrick.phtml" hash="b23472e15332c427456e9d92619eecff"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Paymentwall_Paymentwall.xml" hash="a5ef063119f4c0d274cc2f7a72699538"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>