Cardsave_Cardsaveonlinepayments - Version 1.11.1

Version Notes

Html entity escaping fix placed in the integration library

Download this release

Release Info

Developer Magento Core Team
Extension Cardsave_Cardsaveonlinepayments
Version 1.11.1
Comparing to
See all releases


Code changes from version 1.11.0 to 1.11.1

app/code/local/Cardsave/Cardsaveonlinepayments/Model/Common/ThePaymentGateway/SOAP.php CHANGED
@@ -104,7 +104,7 @@
104
  }
105
  public function setValue($szValue)
106
  {
107
- $this->m_szValue = $szValue;
108
  }
109
  public function getSOAPParamAttributeList()
110
  {
@@ -128,7 +128,6 @@
128
  }
129
 
130
  $this->m_szName = $szName;
131
- //$this->m_szValue = CSV_SharedFunctions::replaceCharsInStringWithEntities($szValue);
132
  $this->setValue($szValue);
133
 
134
  $this->m_lspSOAPParamList = new CSV_SOAPParamList();
104
  }
105
  public function setValue($szValue)
106
  {
107
+ $this->m_szValue = CSV_SharedFunctions::replaceCharsInStringWithEntities($szValue);
108
  }
109
  public function getSOAPParamAttributeList()
110
  {
128
  }
129
 
130
  $this->m_szName = $szName;
 
131
  $this->setValue($szValue);
132
 
133
  $this->m_lspSOAPParamList = new CSV_SOAPParamList();
app/code/local/Cardsave/Cardsaveonlinepayments/Model/Common/ThePaymentGateway/TPG_Common.php CHANGED
@@ -763,7 +763,7 @@
763
  $boFound;
764
  $nHTMLEntityCount;
765
 
766
- $szReturnString = null;
767
 
768
  for ($nCount = 0; $nCount < strlen($szString); $nCount++)
769
  {
@@ -793,7 +793,8 @@
793
  {
794
  $szReturnString .= $szString[$nCount];
795
  }
796
- }
 
797
 
798
  return $szReturnString;
799
  }
@@ -808,7 +809,7 @@
808
  $szAmpersandBuffer = "";
809
  $nAmpersandBufferCount = 0;
810
 
811
- for ($nCount = 0; $nCount < strlen($szString); $nCount++)
812
  {
813
  $boFound = false;
814
  $nHTMLEntityCount = 0;
@@ -883,7 +884,9 @@
883
  if ($boFoundAmpersand && !$boFound)
884
  {
885
  $szReturnString .= $szAmpersandBuffer;
886
- }
 
 
887
 
888
  return $szReturnString;
889
  }
763
  $boFound;
764
  $nHTMLEntityCount;
765
 
766
+ /*$szReturnString = null;
767
 
768
  for ($nCount = 0; $nCount < strlen($szString); $nCount++)
769
  {
793
  {
794
  $szReturnString .= $szString[$nCount];
795
  }
796
+ }*/
797
+ $szReturnString = htmlspecialchars($szString);
798
 
799
  return $szReturnString;
800
  }
809
  $szAmpersandBuffer = "";
810
  $nAmpersandBufferCount = 0;
811
 
812
+ /*for ($nCount = 0; $nCount < strlen($szString); $nCount++)
813
  {
814
  $boFound = false;
815
  $nHTMLEntityCount = 0;
884
  if ($boFoundAmpersand && !$boFound)
885
  {
886
  $szReturnString .= $szAmpersandBuffer;
887
+ }*/
888
+
889
+ $szReturnString = html_entity_decode($szString);
890
 
891
  return $szReturnString;
892
  }
app/code/local/Cardsave/Cardsaveonlinepayments/Model/Direct.php CHANGED
@@ -192,9 +192,9 @@ class Cardsave_Cardsaveonlinepayments_Model_Direct extends Mage_Payment_Model_Me
192
  // assign payment form field values to variables
193
  $order = $payment->getOrder();
194
  // escape the special characters as the PHP integration doesn't do it (ie: & ampersand)
195
- $szOrderID = htmlentities($payment->getOrder()->increment_id);
196
  $szOrderDescription = '';
197
- $szCardName = htmlentities($payment->getCcOwner());
198
  $szCardNumber = $payment->getCcNumber();
199
  $szIssueNumber = $payment->getCcSsIssue();
200
  $szCV2 = $payment->getCcCid();
@@ -202,17 +202,17 @@ class Cardsave_Cardsaveonlinepayments_Model_Direct extends Mage_Payment_Model_Me
202
  $szCurrencyShort = $order->getOrderCurrency()->getCurrencyCode();
203
  // address details
204
  $billingAddress = $order->getBillingAddress();
205
- $szAddress1 = htmlentities($billingAddress->getStreet1());
206
- $szAddress2 = htmlentities($billingAddress->getStreet2());
207
- $szAddress3 = htmlentities($billingAddress->getStreet3());
208
- $szAddress4 = htmlentities($billingAddress->getStreet4());
209
- $szCity = htmlentities($billingAddress->getCity());
210
- $szState = htmlentities($billingAddress->getRegion());
211
- $szPostCode = htmlentities($billingAddress->getPostcode());
212
  $szISO2CountryCode = $billingAddress->getCountry();
213
  $nCountryCode;
214
  $szEmailAddress = $billingAddress->getCustomerEmail();
215
- $szPhoneNumber = htmlentities($billingAddress->getTelephone());
216
  $nDecimalAmount;
217
 
218
  $PaymentProcessorFullDomain = $this->_getPaymentProcessorFullDomain();
@@ -324,7 +324,6 @@ class Cardsave_Cardsaveonlinepayments_Model_Direct extends Mage_Payment_Model_Me
324
  // status code of 0 - means transaction successful
325
  $szLogMessage = "Transaction successfully completed for OrderID: ".$szOrderID.". Result object details: ";
326
  Mage::getSingleton('core/session')->addSuccess($szNotificationMessage);
327
- Mage::getSingleton('checkout/session')->addSuccess($szNotificationMessage);
328
  break;
329
  case 3:
330
  // status code of 3 - means 3D Secure authentication required
192
  // assign payment form field values to variables
193
  $order = $payment->getOrder();
194
  // escape the special characters as the PHP integration doesn't do it (ie: & ampersand)
195
+ $szOrderID = $payment->getOrder()->increment_id;
196
  $szOrderDescription = '';
197
+ $szCardName = $payment->getCcOwner();
198
  $szCardNumber = $payment->getCcNumber();
199
  $szIssueNumber = $payment->getCcSsIssue();
200
  $szCV2 = $payment->getCcCid();
202
  $szCurrencyShort = $order->getOrderCurrency()->getCurrencyCode();
203
  // address details
204
  $billingAddress = $order->getBillingAddress();
205
+ $szAddress1 = $billingAddress->getStreet1();
206
+ $szAddress2 = $billingAddress->getStreet2();
207
+ $szAddress3 = $billingAddress->getStreet3();
208
+ $szAddress4 = $billingAddress->getStreet4();
209
+ $szCity = $billingAddress->getCity();
210
+ $szState = $billingAddress->getRegion();
211
+ $szPostCode = $billingAddress->getPostcode();
212
  $szISO2CountryCode = $billingAddress->getCountry();
213
  $nCountryCode;
214
  $szEmailAddress = $billingAddress->getCustomerEmail();
215
+ $szPhoneNumber = $billingAddress->getTelephone();
216
  $nDecimalAmount;
217
 
218
  $PaymentProcessorFullDomain = $this->_getPaymentProcessorFullDomain();
324
  // status code of 0 - means transaction successful
325
  $szLogMessage = "Transaction successfully completed for OrderID: ".$szOrderID.". Result object details: ";
326
  Mage::getSingleton('core/session')->addSuccess($szNotificationMessage);
 
327
  break;
328
  case 3:
329
  // status code of 3 - means 3D Secure authentication required
package.xml CHANGED
@@ -1,25 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cardsave_Cardsaveonlinepayments</name>
4
- <version>1.11.0</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Cardsave payment extension compatible with Magento v 1.3, 1.4, 1.5 and 1.6</summary>
10
  <description>Fully supports 3D secure transactions. Also supports all of the integration methods provided by CardSave.</description>
11
- <notes>Compatibility support for versions:&#xD;
12
- - 1.6.0&#xD;
13
- - 1.6.1&#xD;
14
- - 1.6.2&#xD;
15
- - other earlier versions&#xD;
16
- Fixes for the following bugs:&#xD;
17
- - back button issue causing incorrect statuses&#xD;
18
- - special character in address details issue in Direct API method</notes>
19
  <authors><author><name>Cardsave</name><user>auto-converted</user><email>integrationsupport@cardsaveonlinepayments.com</email></author></authors>
20
  <date>2012-01-24</date>
21
- <time>13:54:54</time>
22
- <contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><file name="cardsave_online.jpg" hash="abb239c81edb9ae8df8cf891e914e2aa"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="images"><file name="cardsave_online.jpg" hash="abb239c81edb9ae8df8cf891e914e2aa"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="cardsaveonlinepayments"><file name="form.phtml" hash="bf8cf94001d912f6d1e77b1d2b03cf6e"/><file name="info.phtml" hash="9765a5eae50cb6fa21dcec22e7767e79"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="cardsaveonlinepayments"><file name="form.phtml" hash="ad3f2b6304ce7e83e82195aa16fdb43a"/><file name="info.phtml" hash="9765a5eae50cb6fa21dcec22e7767e79"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="cardsaveonlinepayments"><file name="form.phtml" hash="7f67d94e80b469997a5c1ca2f61a4e47"/><file name="info.phtml" hash="c378bb59f085df95a4a6a5d866fc512d"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="cardsaveonlinepayments"><file name="form.phtml" hash="34e9854beb8479eef68f452efa803ec1"/><file name="info.phtml" hash="c378bb59f085df95a4a6a5d866fc512d"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cardsave_All.xml" hash="e1d59fd8c4d4b5d87607f43fecf47e59"/></dir></target><target name="magelocal"><dir name="Cardsave"><dir name="Cardsaveonlinepayments"><dir name="Block"><file name="Error.php" hash="660d3cbde48910ef271df9e05130a6d7"/><file name="Form.php" hash="ea5b3817c9607a94f4685d53d0b18569"/><file name="Info.php" hash="57a4bfec1a1c769de063be2b922f4a97"/><file name="Redirect.php" hash="b5a1f7af807dc9a41ec5b9db5c74e87e"/><file name="Threedsecure.php" hash="9d75776f34c5acaf6ea265f35f302c69"/></dir><dir name="controllers"><file name="PaymentController.php" hash="a296c18e805d796f1408ba73a28dcf2b"/></dir><dir name="etc"><file name="config.xml" hash="d42560b62660323b2139db8201c3205f"/><file name="system.xml" hash="946f07b53a3e5e321cdacb1bad97a469"/></dir><dir name="Helper"><file name="Data.php" hash="e024ec0479d1e8e7efcf4751b05194d6"/></dir><dir name="Model"><dir name="Common"><dir name="ThePaymentGateway"><file name="PaymentSystem.php" hash="e6d7c921f7bc404da6600e27289ca96b"/><file name="SOAP.php" hash="a1587be0f51088e96bc0a4c99055315f"/><file name="TPG_Common.php" hash="74aabb82f296cbb4ce7609b2515b49bf"/></dir><file name="GlobalErrors.php" hash="04d277d4a763efa508bf36d29c7dc8c4"/><file name="ISOCountries.php" hash="78dc558da68ca9a6ef44898a3980ecf2"/><file name="ISOCurrencies.php" hash="a32bc47b2d9896c293ecdcbf847144f9"/><file name="PaymentFormHelper.php" hash="41e22f61e8b71b8e8b6ca78b90da44e5"/></dir><dir name="Source"><file name="HashMethod.php" hash="997928579b69d21ae9eebec698c715c6"/><file name="OrderStatus.php" hash="4c44f8ba1652f20d934aa200ed4c8d00"/><file name="PaymentAction.php" hash="fa94be37c18bbb2f6301bdad1db3698d"/><file name="PaymentMode.php" hash="ea8af602bd09d54a123af64bc4b680d0"/><file name="ResultDeliveryMethod.php" hash="afb838319df715e604173d6aa143feab"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="b2a7e887464ff91517dbb4fd62f13c66"/></dir></dir></dir><file name="Direct.php" hash="4ac698daaba8debb2667bf58fd58752c"/><file name="Request.php" hash="370f028086d13ae1df470e93a67dea66"/></dir><dir name="sql"><dir name="cardsaveonlinepayments_setup"><file name="mysql4-install-0.1.0.php" hash="f8d74ffd9920f7d3d6d63e5062204c61"/></dir></dir></dir><dir name="Checkout"><dir name="Block"><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="695d628564f6e1e0c85e3821699e6b45"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="9dbd58b6b32491d65e5c7d5850aa3420"/></dir><dir name="Model"><dir name="Type"><file name="Onepage.php" hash="8122652860c5f9ac512b25e2088d1099"/></dir></dir></dir><dir name="Sales"><dir name="etc"><file name="config.xml" hash="9c884b19d80ee19e12bed268bb15e4ab"/></dir><dir name="Model"><dir name="Order"><file name="Invoice.php" hash="9be99f3fbe1c4fe98fb110d3daa8afe6"/><file name="Payment.php" hash="14f5fc7b55d07707e252f031f64cf18c"/></dir><dir name="Service"><file name="Quote.php" hash="a514922157b5690772d716c29f4a653e"/></dir><file name="Order.php" hash="9ffa9e06b0d5d8d2d810ab50017e81fa"/></dir></dir></dir></target></contents>
23
  <compatible/>
24
  <dependencies/>
25
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cardsave_Cardsaveonlinepayments</name>
4
+ <version>1.11.1</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Cardsave payment extension compatible with Magento v 1.3, 1.4, 1.5 and 1.6</summary>
10
  <description>Fully supports 3D secure transactions. Also supports all of the integration methods provided by CardSave.</description>
11
+ <notes>Html entity escaping fix placed in the integration library</notes>
 
 
 
 
 
 
 
12
  <authors><author><name>Cardsave</name><user>auto-converted</user><email>integrationsupport@cardsaveonlinepayments.com</email></author></authors>
13
  <date>2012-01-24</date>
14
+ <time>15:47:33</time>
15
+ <contents><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><file name="cardsave_online.jpg" hash="abb239c81edb9ae8df8cf891e914e2aa"/></dir></dir></dir><dir name="base"><dir name="default"><dir name="images"><file name="cardsave_online.jpg" hash="abb239c81edb9ae8df8cf891e914e2aa"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="cardsaveonlinepayments"><file name="form.phtml" hash="bf8cf94001d912f6d1e77b1d2b03cf6e"/><file name="info.phtml" hash="9765a5eae50cb6fa21dcec22e7767e79"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="cardsaveonlinepayments"><file name="form.phtml" hash="ad3f2b6304ce7e83e82195aa16fdb43a"/><file name="info.phtml" hash="9765a5eae50cb6fa21dcec22e7767e79"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="cardsaveonlinepayments"><file name="form.phtml" hash="7f67d94e80b469997a5c1ca2f61a4e47"/><file name="info.phtml" hash="c378bb59f085df95a4a6a5d866fc512d"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="cardsaveonlinepayments"><file name="form.phtml" hash="34e9854beb8479eef68f452efa803ec1"/><file name="info.phtml" hash="c378bb59f085df95a4a6a5d866fc512d"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Cardsave_All.xml" hash="e1d59fd8c4d4b5d87607f43fecf47e59"/></dir></target><target name="magelocal"><dir name="Cardsave"><dir name="Cardsaveonlinepayments"><dir name="Block"><file name="Error.php" hash="660d3cbde48910ef271df9e05130a6d7"/><file name="Form.php" hash="ea5b3817c9607a94f4685d53d0b18569"/><file name="Info.php" hash="57a4bfec1a1c769de063be2b922f4a97"/><file name="Redirect.php" hash="b5a1f7af807dc9a41ec5b9db5c74e87e"/><file name="Threedsecure.php" hash="9d75776f34c5acaf6ea265f35f302c69"/></dir><dir name="controllers"><file name="PaymentController.php" hash="a296c18e805d796f1408ba73a28dcf2b"/></dir><dir name="etc"><file name="config.xml" hash="d42560b62660323b2139db8201c3205f"/><file name="system.xml" hash="946f07b53a3e5e321cdacb1bad97a469"/></dir><dir name="Helper"><file name="Data.php" hash="e024ec0479d1e8e7efcf4751b05194d6"/></dir><dir name="Model"><dir name="Common"><dir name="ThePaymentGateway"><file name="PaymentSystem.php" hash="e6d7c921f7bc404da6600e27289ca96b"/><file name="SOAP.php" hash="ed4585a1acc60a67fac72f6022084688"/><file name="TPG_Common.php" hash="0170a3c7f6a01faf9aee9b0f94da6d2a"/></dir><file name="GlobalErrors.php" hash="04d277d4a763efa508bf36d29c7dc8c4"/><file name="ISOCountries.php" hash="78dc558da68ca9a6ef44898a3980ecf2"/><file name="ISOCurrencies.php" hash="a32bc47b2d9896c293ecdcbf847144f9"/><file name="PaymentFormHelper.php" hash="41e22f61e8b71b8e8b6ca78b90da44e5"/></dir><dir name="Source"><file name="HashMethod.php" hash="997928579b69d21ae9eebec698c715c6"/><file name="OrderStatus.php" hash="4c44f8ba1652f20d934aa200ed4c8d00"/><file name="PaymentAction.php" hash="fa94be37c18bbb2f6301bdad1db3698d"/><file name="PaymentMode.php" hash="ea8af602bd09d54a123af64bc4b680d0"/><file name="ResultDeliveryMethod.php" hash="afb838319df715e604173d6aa143feab"/></dir><dir name="Resource"><dir name="Eav"><dir name="Mysql4"><file name="Setup.php" hash="b2a7e887464ff91517dbb4fd62f13c66"/></dir></dir></dir><file name="Direct.php" hash="557a10ee62923ec7ddf7e1b58a43df33"/><file name="Request.php" hash="370f028086d13ae1df470e93a67dea66"/></dir><dir name="sql"><dir name="cardsaveonlinepayments_setup"><file name="mysql4-install-0.1.0.php" hash="f8d74ffd9920f7d3d6d63e5062204c61"/></dir></dir></dir><dir name="Checkout"><dir name="Block"><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="695d628564f6e1e0c85e3821699e6b45"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="9dbd58b6b32491d65e5c7d5850aa3420"/></dir><dir name="Model"><dir name="Type"><file name="Onepage.php" hash="8122652860c5f9ac512b25e2088d1099"/></dir></dir></dir><dir name="Sales"><dir name="etc"><file name="config.xml" hash="9c884b19d80ee19e12bed268bb15e4ab"/></dir><dir name="Model"><dir name="Order"><file name="Invoice.php" hash="9be99f3fbe1c4fe98fb110d3daa8afe6"/><file name="Payment.php" hash="14f5fc7b55d07707e252f031f64cf18c"/></dir><dir name="Service"><file name="Quote.php" hash="a514922157b5690772d716c29f4a653e"/></dir><file name="Order.php" hash="9ffa9e06b0d5d8d2d810ab50017e81fa"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>