News:

Looking for documentation? Take a look on our wiki

Main Menu

Westpac web advantage payment module - Australian

Started by andimorton, July 02, 2006, 08:51:53 AM

Previous topic - Next topic

andimorton

My fabbo husband created this Westpac Web Advantage payment module. It's available from http://www.virtuit.com.au


hisreign


Caleb

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?

andimorton

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>';
}
?>

Caleb


andimorton


ecweb

Hi,

I'm having problems with this payment module.
I have already posted here: 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?