News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Intergration of Mastercard Gateway in Australia

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

Previous topic - Next topic

chibee

Hi, im just have an error that maybe you could help me.

Error: the order number is duplicate or not found.

bookings.citect.com  MIGS

Response
Transaction Reference/Order Number:
fcba7fbacc81f27ac13ae6256ff20eae

Purchase Amount (AUD, Australian dollars):
10.83
--------------------------------------------------------------------------------

Response:
Unknown Error

Message:
Unspecified Failure

Receipt Number:
080819000009

Transaction Number:
9

Bank Authorization ID:
No Value Returned

Batch Number:
20080819

Card Type:
VC


i am running vm 1.0.15 stable, joomla 1.0.15 stable (locally)
i have followed Toivo's instructions and have copied the files to the right dirs.

The error appears when i submit the test visa credit card details into migs page.

Please help


[attachment cleanup by admin]

toivo

Obviously something has not been done right.  The idea behind matching the order number returned from MIGS to an existing order number and the order status in VirtueMart is to make sure the transactions are not re-played by pressing the Back key in the browser. 

The order has to be in the Pending state and a successful card transaction changes the status to Confirmed, otherwise Cancelled.

You have to follow the instructions provided by MIGS regarding test transactions.  The cents in the amount determine the response from the gateway.  If I remember correctly, the transaction is only approved if the amount ends in .00.
toivo
-------------------------
Suzhou, China

RobertL

Hi again,

my website is now live, and though I was close to getting it happening,
going to do a test now, it's gone donwhill. I'm starting from scratch,
but here is the error i got using old setup (where it just didn't get
the key properly). any help would be great. thanks

[attachment cleanup by admin]

toivo

Hi,

Did you modify the code for VM 1.1?  The original has only been tested with VM 1.0.15.

If you added the secure hash by hard coding to the request, you need to do the same when checking the result from the gateway.  The original code extracts it from the configuration file.

The screenshot you provided does not come from checkout.result_migs.php but something else.  Are you sure you have implemented the bank hosted solution as instructed in the documentation?

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

toivo

Here is the plugin for MasterCard Internet Gateway Service (MIGS), Bank Hosted mode of operation, for VirtueMart 1.1.

It has been tested with Joomla 1.0.15 and VM1.1.2. 

The installation instructions are included with screenshots.

Regards,
toivo

[attachment cleanup by admin]
toivo
-------------------------
Suzhou, China

toivo

#65
Hi,

The plugin in the previous post does not work with Joomla 1.5.  Here is a new version which has been tested on VirtueMart 1.1.2 and Joomla 1.5.6.  

Regards,
Toivo

Update 16/3/2010:  The attachment migs_bank_hosted_J15_VM11.zip from 31/8/2008 has now been restored, after it had been deleted inadvertently.

[attachment cleanup by admin]
toivo
-------------------------
Suzhou, China

spauldingsmails

Hi Toivo

New Joomla 1.5 version of the module's working great, thanks.

Have you considered licensing this under a F/OSS license and creating a joomlacode project? That way you could more easily manage distribution and add it to the joomla extensions repository.

toivo

Hi,

That is interesting but may be tricky because of the copyright in the code from the MIGS VPC demo scripts, which I got permission to include in the plugin and post to this forum.

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

spauldingsmails

Quote from: Toivo Talikka on September 03, 2008, 10:25:48 AM
That is interesting but may be tricky because of the copyright in the code from the MIGS VPC demo scripts, which I got permission to include in the plugin and post to this forum.

Hmm. Good point. Are the VPC demo scripts isolated or are they integrated tightly into the rest of the code base? If they are isolated, I'm wondering if there is a way to distribute it in such a way that it can be open sourced with infringing on the proprietary VPC license (I.e. not permitting the user to change the VPC code).

toivo

QuoteHmm. Good point. Are the VPC demo scripts isolated or are they integrated tightly into the rest of the code base? If they are isolated, I'm wondering if there is a way to distribute it in such a way that it can be open sourced with infringing on the proprietary VPC license (I.e. not permitting the user to change the VPC code).

You mean 'without infringing'? Both the code which prepares the request with the hash and the code which validates the returned hash and presents the result from the gateway come from the VPC demo, just slightly improved to avoid PHP warnings. The demo modules are meant to be run on their own. 

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

scottnight

Thanks Toivo, you're code works perfectly.  Appreciate you sharing with the community.

freifer

Hi Tovio and all,

I am new to this, I need to process payment by credit card directly to our account with CBA, I downloaded  MIGS Bank Hosted plugin for VM 1.1 and Joomla 1.5, and followed the instructions, but when tried to process a sale through VM it displayed the following:

THANK YOU FOR YOUR ORDER.

Your order has been successfully placed!

A confirmation email has been sent to: info@websitenames.com.au

global $VM_LANG; $database =& new ps_DB; $ps_vendor_id = $_SESSION['ps_vendor_id']; $tax_total = $db->f('order_tax') + $db->f('order_shipping_tax'); $discount_total = $db->f('coupon_discount') + $db->f('order_discount'); $order_total = round($db->f('order_subtotal') + $tax_total + $db->f('order_shipping') - $discount_total, 2); $order_shipping = sprintf('%.2f', $db->f('order_shipping')); $order_id = $db->f('order_id') ; $order_number = $db->f('order_number'); $order_item_sku = $db->f('order_item_sku') ; $order_item_name = $db->f('order_item_name') ; require_once(CLASSPATH . 'payment/ps_migs_pay.cfg.php'); if( !defined('_VALID_MOS') && !defined('_JEXEC') ) die( 'Direct Access to ' . basename(__FILE__). ' is not allowed.' ); $database->query( "SELECT ".VM_DECRYPT_FUNCTION."(payment_passkey,'".ENCODE_KEY."') AS `passkey` FROM #__vm_payment_method WHERE payment_method_code = 'MIGS'" ); $transaction = $database->record[0]; if (empty($transaction->passkey)) { error_log('checkout.result_migs.php error: passkey empty'); echo $VM_LANG->_('VM_CHECKOUT_FAILURE') . '. Technical Note 1: The required transaction key is empty! The payment method settings must be reviewed.'; return false; } $vpcURL = "https://" . virtualPaymentClientURL . "?"; $SECURE_SECRET = trim($transaction->passkey); // remove cr or lf $md5HashData = $SECURE_SECRET; // https $vm_url = SECUREURL . 'index.php?option=com_virtuemart'; $vm_url .= '&page=checkout.result_migs'; $formdata = array ( 'vpc_ReturnURL' => $vm_url, 'vpc_Version' => vpc_Version, 'vpc_Command' => vpc_Command, 'vpc_MerchTxnRef' => $order_number, 'vpc_AccessCode' => vpc_AccessCode, 'vpc_Merchant' => vpc_Merchant, 'vpc_OrderInfo' => $order_number, 'vpc_Amount' => $order_total * 100 ); ksort($formdata); // Get the URL and append variables foreach($formdata as $key => $value) { if (!empty($value)) { // skip empty variables $vpcURL .= urlencode($key) . '=' . urlencode($value) . '&'; $md5HashData .= $value; // Append to md5 hash data } } // create secure hash and append it to virtual payment client data if secure secret has been provided if (strlen($SECURE_SECRET) > 0) { $vpcURL .= "vpc_SecureHash=" . strtoupper(md5($md5HashData)); } header( "Location: " . $vpcURL); ?>

Follow this link to view the Order Details.


I am not sure what i am doing wrong or how this Plugin is supposed to behave... can you please help, and please excuse my ignorance ...

I am running with joomla 1.5.9  and Virtuemart 1.1.3

Regards

Freifer

toivo

You must have missed the initial PHP tag <?php when you copied the code to the Payment Extra Info.
toivo
-------------------------
Suzhou, China

mikk

I'm using Virtuemart 1.0.15 and Joomla 1.0.12.

This payment method is great!

Does anyone know how to change it so that the Mastercard Gateway gets the Customer Name as the Order Reference instead of the order number?

Also, I'm using PayPal, but since commenting out the sending of the email from around line 1040 of ps_checkout.php:
$this->email_receipt($order_id);

, I don't get emails about pending PayPal orders. How do I change it to check for PayPal payment method before the email is sent?

tiju_t

Hi Toivo

I realise this is a very old topic, but I am just starting to implement ANZ egate integration on my website (J 1.5.10 | VM 1.1.3)

I have downloaded the plugin attached to your earlier post, but find that it only contains a doc file. Where would I get the php files from?

Thanks heaps.