News:

Looking for documentation? Take a look on our wiki

Main Menu

Intergration of Mastercard Gateway in Australia

Started by aussieute, July 11, 2006, 22:16:18 PM

Previous topic - Next topic

asterix

Quote from: tez on June 20, 2008, 05:30:58 AM
I still have trouble with the function process_payment()
The $order_number value always seems to be a long string which is not related to the order ID, it always starts with the same number (62_ in my tests).

TEZ, just use the send the customer name under the merchant_txn_ref. You can still track them through the bank interface by using order date/time and customer name from your orders list. :)

darshanpm

Hi Everyone,

I am not able to get the MIGS working.  I am using the shorty's script and i have a client merchant account with bendigo bank.  I am not getting any error but on the payment page, there are no credit cards listed to select one from there.  Can anyone tell me how to get the payment thing working with the bendigo bank merchant account.

Waiting for some reply,

Thanks,
Darshan

toivo

Hi Darshan,

Are you working on the Merchant Hosted scenario where VirtueMart is in control?  My solution from the previous page integrates code from different sources, including shorty's, and implements the Bank Hosted model of MIGS. It includes a detailed document.

If you create a payment method, make sure you associate it with the default shopper group or the group to which your shoppers belong.

Regards,
toivo
-------------------------
Suzhou, China

darshanpm

Hi Toivo,

Thanks for your reply.

I tried that code also but it also doesn't list any credit card in the drop-down list.  I checked and I have associated it with the default shopper group.  I have attached few screenshots of the same.  Can you tell me what am i doing wrong.

In the Virtual Payment Client URL:, I have entered migs.mastercard.com.au/vpcpay
Is that correct?

I am using vm 1.1.0 and Joomla! 1.0.15 Stable

Waiting for reply,

Thanks,
Darshan

[attachment cleanup by admin]

toivo

#49
Hi Darshan,

The VPC URL is correct.  My installation is in production under Joomla 1.0.15 and  VM 1.0.15 eCommerce Edition.  I have not had a chance to try it under VM 1.1.0.

Your first screenshot shows that you have selected 'Use Payment Processor'.  I have not tested that approach, I wanted to bypass the Payment Processor because that would lead to the Merchant Hosted mode of operation.  Therefore I removed the name of the payment class as the last step of the installation of the MIGS Payment Method and selected 'Address Only / Cash On Delivery' as the Payment Method Type.  The installation instructions clarify this step by step.

Another approach was suggested by Foxweb who gave the following patch which you may want to try:
QuoteIn the file ps_migs_pay.php I needed to change line 193 to 'return true;' rather than just 'return;'.

The Bank Hosted solution is not supposed to prompt any credit card information, compared to your 2nd screenshot. The card type and the other details are prompted after the control is passed through the VPC URL to the MIGS Gateway at the end of the Payment Extra Info code. 

Regards,





toivo
-------------------------
Suzhou, China

toivo

Thanks to Dan for reporting that freight was not included in the credit card total. 

The Payment Extra Info needs to be amended:


// 20080718 shipping
// $order_total = round($db->f("order_subtotal") + $tax_total - $discount_total, 2);
$order_total = round($db->f("order_subtotal") + $tax_total + $db->f("order_shipping") - $discount_total, 2);
// 20080718 end


A new version is now posted at http://forum.virtuemart.net/index.php?topic=19994.42.
toivo
-------------------------
Suzhou, China

RobertL

Hi Tovio,

thanks for posting your work, great stuff.

Regards

RobertL

#52
Got a little stuck hope you might help. Running VM v1.1.0, still testing on local server. I have added the secure_secret, only thing I couldn't do is remove ps_migs_pay (page 6).

regards

[attachment cleanup by admin]

toivo

Hi,

I do not have VM 1.1.0.  If you cannot remove ps_migs_pay from the configuration, I suggest that you edit the row in the table containing the payment methods before you try a test transaction.

Regards,
toivo
-------------------------
Suzhou, China

RobertL

thanks for the reply. have done but still same message, seems that for some reason, it's not getting the secure hash correctly. I added them manually into both ps_migs_pay and cfg but it didn't work. Can code in extra_info perhaps be changed to include secure hash directly rather than draw from form?

regards

toivo

The secure secret is retrieved in the extra_info code from the table jos_vm_payment_method, using the payment method name as the key.  I do not think it is safe practice to hard code it in.

The error message you receive from the bank indicates that the secure secret is not included in the transaction.  Have you possibly changed the name of the payment method?

If you have changed the name of the payment method from 'MIGS Credit Card', you need to modify line 35 in extra_info accordingly. 

Regards,

toivo
-------------------------
Suzhou, China

RobertL

Sadly no, payment method has remained the same but it's not getting it

tez

Quote from: asterix on July 05, 2008, 16:26:27 PM
Quote from: tez on June 20, 2008, 05:30:58 AM
I still have trouble with the function process_payment()
The $order_number value always seems to be a long string which is not related to the order ID, it always starts with the same number (62_ in my tests).
TEZ, just use the send the customer name under the merchant_txn_ref. You can still track them through the bank interface by using order date/time and customer name from your orders list. :)
Oh, I thought this merchant_txn_ref was a key which needed to contain the order hash for security.

goeasy

have you finally fine someone for intergration of mastercard gadeway in Australia?

toivo

The download for VirtueMart 1.0.15 is in Reply #42.
toivo
-------------------------
Suzhou, China