Are there any plans to develop this module for Drupal 6.x?

CommentFileSizeAuthor
#5 uc_nab_transact.tar_.gz8.7 KBrixrix
#1 uc_nab_transact.zip9.21 KBemTque

Comments

emTque’s picture

StatusFileSize
new9.21 KB

this is my first attempt at updating a module from Drupal 5 to Drupal 6, so sorry if it is totally wrong!!! i have made very few changes (3 or 4 to be exact), and it seems to be working for me, but if anyone else would like to give it a go that would be great.

Anonymous’s picture

I thought I would just share my experiences with this module. I saved my client having to have an eWay account by hooking up with their NAB Transact account using this.

The module update by mattq1985 worked perfectly in Drupal 6 until I updated Ubercart from 6.x-2.0-beta5 to 6.x-2.0-rc6. After the update it returned the PHP error:

PHP Fatal error: Class 'JSimpleXML' not found in /Applications/MAMP/htdocs/plum/sites/all/modules/uc_nab_transact/uc_nab_transact.module on line 130

It turns out that the file simplexml.php located in ubercart/uc_store/includes is no longer included in Ubercart. After I brought the file simplexml.php across from the previous version of Ubercart everything worked perfectly again.

rszrama’s picture

Interesting. In that case, I bet we can simply replace the line referencing JSimpleXML with SimpleXML and leave behind that file.

MaediPrichard’s picture

The fix in #2 no longer seems to work for Beta7 so I've tried replacing the JSimpleXML with a SimpleXML version. Not being a coder, I've tried adjusting the code with things like:

$xml = new SimpleXMLElement($response);
$xml = $xml->$response->data;

which returns the following when clicking Submit Order

"Payment failed for order 479: Credit card payment declined: Failed to parse the XML API request or response."

Failed XML parse response:
<?xml version="1.0" encoding="UTF-8"?><NABTransactMessage><MessageInfo><messageID>6da9003b743b65f4c0ccd295cc484e</messageID><messageTimestamp>20092010231206428000+660</messageTimestamp><apiVersion>xml-4.2</apiVersion></MessageInfo><RequestType>Payment</RequestType><MerchantInfo><merchantID>ABK0010</merchantID></MerchantInfo><Status><statusCode>000</statusCode><statusDescription>Normal</statusDescription></Status><Payment><TxnList count="1"><Txn ID="1"><txnType>0</txnType><txnSource>23</txnSource><amount>4642</amount><currency>AUD</currency><purchaseOrderNo>ABA479</purchaseOrderNo><approved>No</approved><responseCode>05</responseCode><responseText>Do Not Honour</responseText><thinlinkResponseCode>200</thinlinkResponseCode><thinlinkResponseText>000</thinlinkResponseText><thinlinkEventStatusCode>000</thinlinkEventStatusCode><thinlinkEventStatusText>Normal</thinlinkEventStatusText><settlementDate>20091021</settlementDate><txnID>619278</txnID><authID> </authID><CreditCardInfo><pan>401288...881</pan><expiryDate>01/17</expiryDate><cardType>6</cardType><cardDescription>Visa</cardDescription></CreditCardInfo></Txn></TxnList></Payment></NABTransactMessage>

Or:

$xml = simplexml_load_string($response->data);

Which returns a similar error. What kind of code do we need to put in here?

rixrix’s picture

StatusFileSize
new8.7 KB

Hi,

Here's the slightly modified module. It's working perfectly on our production site. Give it a try.

Deployed Environment :

PHP v5.2.6
Drupal v6.13
Ubercart v2.2

Hope that helps

tika’s picture

Excited about this one!

Where should I copy and paste?

thanks in advance

jm.federico’s picture

Version: 5.x-1.0 » 6.x-1.0-beta1
Status: Active » Closed (fixed)

Thanks for this guys.
I've just started working on the 6.x branch. A release is now available.

Testing will be appreciated.

Cheers

cmwwebfx’s picture

Will this take care of the NAB hpp (hosted payments page) that is hosted at NAB?