Cardsave_Cardsaveonlinepayments - Version 1.10.2

Version Notes

Fixed SQL installation script error for pre 1.5 Magento versions.

Download this release

Release Info

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


Code changes from version 1.10.1 to 1.10.2

app/code/local/Cardsave/Cardsaveonlinepayments/Model/Common/ThePaymentGateway/SOAP.php CHANGED
@@ -441,7 +441,7 @@
441
  }
442
  public function getLastException()
443
  {
444
- $this->m_eLastException;
445
  }
446
 
447
  public function buildPacket()
441
  }
442
  public function getLastException()
443
  {
444
+ return $this->m_eLastException;
445
  }
446
 
447
  public function buildPacket()
app/code/local/Cardsave/Cardsaveonlinepayments/Model/Direct.php CHANGED
@@ -311,9 +311,14 @@ class Cardsave_Cardsaveonlinepayments_Model_Direct extends Mage_Payment_Model_Me
311
  {
312
  // could not communicate with the payment gateway
313
  $error = Cardsave_Cardsaveonlinepayments_Model_Common_GlobalErrors::ERROR_261;
 
 
 
 
314
 
315
  $szLogMessage = "Couldn't complete transaction. Details: ".print_r($cdtrCardDetailsTransactionResult, 1)." ".print_r($todTransactionOutputData, 1); //"Couldn't communicate with payment gateway.";
316
  Mage::log($szLogMessage);
 
317
  }
318
  else
319
  {
311
  {
312
  // could not communicate with the payment gateway
313
  $error = Cardsave_Cardsaveonlinepayments_Model_Common_GlobalErrors::ERROR_261;
314
+ if($cdtCardDetailsTransaction->getLastException())
315
+ {
316
+ $error.= " [ ". $cdtCardDetailsTransaction->getLastException() . " ]";
317
+ }
318
 
319
  $szLogMessage = "Couldn't complete transaction. Details: ".print_r($cdtrCardDetailsTransactionResult, 1)." ".print_r($todTransactionOutputData, 1); //"Couldn't communicate with payment gateway.";
320
  Mage::log($szLogMessage);
321
+ Mage::log("Last exception: ".print_r($cdtCardDetailsTransaction->getLastException(), 1));
322
  }
323
  else
324
  {
app/code/local/Cardsave/Cardsaveonlinepayments/sql/cardsaveonlinepayments_setup/mysql4-install-0.1.0.php CHANGED
@@ -6,21 +6,32 @@ $installer->startSetup();
6
 
7
  Mage::log('cardsave installer script started');
8
 
9
- $installer->run("
10
- DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_failed_hosted_payment');
11
- DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_failed_threed_secure');
12
- DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_paid');
13
- DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_pending');
14
- DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_pending_hosted_payment');
15
- DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_pending_threed_secure');
16
 
17
- INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_failed_hosted_payment', 'CardSave - Failed Payment');
18
- INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_failed_threed_secure', 'CardSave - Failed 3D Secure');
19
- INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_paid', 'CardSave - Successful Payment');
20
- INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_pending', 'CardSave - Pending Payment');
21
- INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_pending_hosted_payment', 'CardSave - Pending Hosted Payment');
22
- INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_pending_threed_secure', 'CardSave - Pending 3D Secure');
23
- ");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  Mage::log('cardsave installer script ended');
26
 
6
 
7
  Mage::log('cardsave installer script started');
8
 
9
+ $script = "SELECT * FROM `{$installer->getTable('sales_order_status')}`";
10
+ $result = @mysql_query($script);
 
 
 
 
 
11
 
12
+ if(mysql_errno() == 1146)
13
+ {
14
+ // table doesn't exist (Magento prior to v1.5.0)
15
+ }
16
+ else if(!mysql_errno())
17
+ {
18
+ // if no error occurred run the install script
19
+ $installer->run("
20
+ DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_failed_hosted_payment');
21
+ DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_failed_threed_secure');
22
+ DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_paid');
23
+ DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_pending');
24
+ DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_pending_hosted_payment');
25
+ DELETE FROM `{$installer->getTable('sales_order_status')}` WHERE (`status`='csv_pending_threed_secure');
26
+
27
+ INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_failed_hosted_payment', 'CardSave - Failed Payment');
28
+ INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_failed_threed_secure', 'CardSave - Failed 3D Secure');
29
+ INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_paid', 'CardSave - Successful Payment');
30
+ INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_pending', 'CardSave - Pending Payment');
31
+ INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_pending_hosted_payment', 'CardSave - Pending Hosted Payment');
32
+ INSERT INTO `{$installer->getTable('sales_order_status')}` (`status`, `label`) VALUES ('csv_pending_threed_secure', 'CardSave - Pending 3D Secure');
33
+ ");
34
+ }
35
 
36
  Mage::log('cardsave installer script ended');
37
 
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cardsave_Cardsaveonlinepayments</name>
4
- <version>1.10.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 and 1.5</summary>
10
  <description>Fully supports 3D secure transactions. Also supports all of the integration methods provided by CardSave.</description>
11
- <notes>Fixed sql script</notes>
12
  <authors><author><name>Cardsave</name><user>auto-converted</user><email>integrationsupport@cardsaveonlinepayments.com</email></author></authors>
13
- <date>2011-06-09</date>
14
- <time>09:32:46</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="8bfece31f856e90f0cdadf3bca067ccf"/></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="e4d4df170c21b7e3571b3ba1205ca979"/><file name="SOAP.php" hash="a0e5474dce51dc90ba4d37b5de3cdd84"/><file name="TPG_Common.php" hash="d86997c977cfd55b8ab577a514ab149c"/></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="e35e88bd1c4dd94dc59adb6cb5061321"/><file name="Request.php" hash="370f028086d13ae1df470e93a67dea66"/></dir><dir name="sql"><dir name="cardsaveonlinepayments_setup"><file name="mysql4-install-0.1.0.php" hash="9a720dbd1752c9651733b068730e686a"/></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="7d1b93be12eebd5e317d72655ba1d8e1"/></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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cardsave_Cardsaveonlinepayments</name>
4
+ <version>1.10.2</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 and 1.5</summary>
10
  <description>Fully supports 3D secure transactions. Also supports all of the integration methods provided by CardSave.</description>
11
+ <notes>Fixed SQL installation script error for pre 1.5 Magento versions.</notes>
12
  <authors><author><name>Cardsave</name><user>auto-converted</user><email>integrationsupport@cardsaveonlinepayments.com</email></author></authors>
13
+ <date>2011-06-30</date>
14
+ <time>18:02:05</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="8bfece31f856e90f0cdadf3bca067ccf"/></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="e4d4df170c21b7e3571b3ba1205ca979"/><file name="SOAP.php" hash="cd2c165c0290f828a3be81765c737a85"/><file name="TPG_Common.php" hash="d86997c977cfd55b8ab577a514ab149c"/></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="454fc94ea5dc5780cef62fd4d1a2cb44"/><file name="Request.php" hash="370f028086d13ae1df470e93a67dea66"/></dir><dir name="sql"><dir name="cardsaveonlinepayments_setup"><file name="mysql4-install-0.1.0.php" hash="a0ed16a03396ab323dee7e15cae9343d"/></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="7d1b93be12eebd5e317d72655ba1d8e1"/></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>