I have Joomla 1.5.15 and this doesn't work for me.
I'm not sure why either.
on my end this is the last screen i get:
Thank you for your order.
Success Your order has been successfully placed!
A confirmation email has been sent to: admin@XXXX.com
$db1 = new ps_DB(); $q = "SELECT country_2_code FROM #__vm_country WHERE country_3_code='".$user->country."' ORDER BY country_2_code ASC"; $db1->query($q); $url = "
https://www.beanstream.com/scripts/payment/payment.asp"; //https://www.beanstream.com/scripts/payment/payment.asp?merchant_id=XXXXXXXXX $fName = $dbbt->f("first_name"); $lName = $dbbt->f("last_name"); $tax_total = $db->f("order_tax") + $db->f("order_shipping_tax"); $discount_total = $db->f("coupon_discount") + $db->f("order_discount"); $shipping = sprintf("%.2f", $db->f("order_shipping")); $post_variables = Array( //"errorPage"=>"
https://www.beanstream.com/samples/order_form.asp", // ## NOT REQUIRED ## //"trnCardNumber"=>"XXXXXXXXX", //test MC number //"trnExpMonth"=>"12", //testing //"trnExpYear"=>"12", //testing "trnOrderNumber"=>$db->f("order_id"), "trnAmount"=>round( $db->f("order_subtotal")+$tax_total+$shipping-$discount_total, 2), "trnCardOwner"=>$dbbt->f("first_name")." ".$dbbt->f("last_name"), "ordAddress1"=>$dbbt->f('address_1'), "ordAddress2"=>$dbbt->f('address_2'), "ordCity"=>$dbbt->f('city'), "ordProvince"=>$dbbt->f('state'), "ordPostalCode"=>$dbbt->f('zip'), "ordName"=>$dbbt->f("first_name")." ".$dbbt->f("last_name"), "ordEmailAddress"=>$dbbt->f('user_email'), "ordPhoneNumber"=>$dbbt->f('phone_1'), "ordCountry"=>$db1->f('country_2_code'), //**************************************************************************** "merchant_id"=>"XXXXXXXXX" //**************************************************************************** ); if( $page == "checkout.thankyou" ) { $query_string = "?"; foreach( $post_variables as $name => $value ) { $query_string .= $name. "=" . urlencode($value) ."&"; } // ## SEND AN EMAIL ## // NOTE: I haven't tested this mailout yet... it could be modified to // send a confirmation email upon successful transaction. I am not sure which // variables Beanstream sends back to server upon successful (or failed) transaction. $to = "admin@XXXXXX.com"; $subject = "the subject"; $message = "hello world from PHP Mail\nthe transaction ID was " . $db->f("order_id"); $headers = "From: bar@example.com" . '\r\n' . "Reply-To: bar@example.com" . '\r\n' . "X-Mailer: PHP/" . phpversion(); mail($to, $subject, $message, $headers); // ## END PHP MAIL ## vmRedirect( $url . $query_string ); } else { // ## MODIFY THIS TEXT TO SUIT YOUR NEEDS ## echo '
Please read the following information, and click the button to continue.
You will be directed to a secure payment form hosted by Beanstream, where you may pay for your order using VISA or Mastercard. Once we receive confirmation of payment from Beanstream, we will ship your order. Thank you.
'; echo '
'; echo '
Proceed to Credit Card Processing →
'; foreach( $post_variables as $name => $value ) { echo ''; } echo '
'; } ?>
Follow this link to view the Order Details.
Is there anyone who can point me in the right direction for a module that works with Beanstream and virtuemart 1.5.15 ?
Any help will be greatly appreciated!
If you require some type of donation or payment let me know.
Cheers.
*Mad