VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Payment Modules => Topic started by: andimorton on July 02, 2006, 08:51:53 AM

Title: Westpac web advantage payment module - Australian
Post by: andimorton on July 02, 2006, 08:51:53 AM
My fabbo husband created this Westpac Web Advantage payment module. It's available from http://www.virtuit.com.au
Title: Re: Westpac web advantage payment module - Australian
Post by: kelfy on July 03, 2006, 01:34:02 AM
awsome  :D
Title: Re: Westpac web advantage payment module - Australian
Post by: hisreign on July 04, 2006, 15:59:41 PM
Thanks for the post!

Cheers

Andrew
Title: Re: Westpac web advantage payment module - Austral
Post by: Caleb on December 11, 2006, 03:26:06 AM
we've installed the payment module in virtuemart now. i dont know if it works = ive tested it out through the frontend and from their POV it works out fine. i know for a fact that westpac doesn't allow credit card details to be entered outside of their secure site (but virtuemart shows up with 'credit card details to insert).

also, nowhere in the code does 'https://verifytransact.webadvantage.com.au/host/cgi-bin/test_payment.pl' appear. how does virtuemart know how to point to this?
Title: Re: Westpac web advantage payment module - Australian
Post by: andimorton on December 11, 2006, 05:30:05 AM
You have to add this to the payment extra info section of the configuration (the same place you insert your vendor id:

I thought it came up automatically but I guess I was wrong. We built this for someone else and I don't use it myself.


<?php
$url = "https://verifytransact.webadvantage.com.au/host/cgi-bin/test_payment.pl";
if (WESTPAC_TEST_MODE == 0) {
  $url = "https://transact.webadvantage.com.au/host/cgi-bin/make_payment.pl";
}
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");
$post_variables = Array(
"vendor_name"=>WESTPAC_VENDOR_NAME,
"print_zero_qty"=>"false",
"payment_alert"=> WESTPAC_PAYMENT_ALERT,
"Order ".$db->f("order_id") => round( $db->f("order_subtotal")+$tax_total-$discount_total, 2),
"Shipping" => sprintf("%.2f", $db->f("order_shipping"))
);
if( $page == "checkout.thankyou" ) {
  $query_string = "?";
  foreach( $post_variables as $name => $value ) {
    $query_string .= $name. "=" . urlencode($value) ."&";
  }
  mosRedirect( $url . $query_string );
}
else {
  echo '<form action="'.$url.'" method="post" target="_blank">';
  foreach( $post_variables as $name => $value ) {
    echo '<input type="hidden" name="'.$name.'" value="'.$value.'" />';
  }
  echo '</form>';
}
?>
Title: Re: Westpac web advantage payment module - Australian
Post by: Caleb on December 11, 2006, 06:03:47 AM
awesome timing andi, thanks heaps ur a lengend
Title: Re: Westpac web advantage payment module - Australian
Post by: andimorton on February 24, 2008, 08:06:01 AM
Updated files with full instructions are now available from www.virtuit.com.au (http://www.virtuit.com.au)
Title: Re: Westpac web advantage payment module - Australian
Post by: ecweb on March 05, 2010, 01:42:40 AM
Hi,

I'm having problems with this payment module.
I have already posted here: http://forum.virtuemart.net/index.php?topic=44029.msg224108#msg224108 (http://forum.virtuemart.net/index.php?topic=44029.msg224108#msg224108)

The details:
Hi all,

I'm having some problems with this Web Advantage module. I've installed as specified in the instructions, but as soon as I change the Payment class name to be ps_westpac and then save I have issues.

Basically when I then go back into the payment type, the screen isn't formatted correctly and a bunch of options are missing. I'm thinking there's an issue with the ps_westpac.php file. Has anyone experienced this and has a fix?