Author Topic: Beanstream payment method for Virtuemart  (Read 28939 times)

Syn

  • Beginner
  • *
  • Posts: 29
Re: Beanstream payment method for Virtuemart
« Reply #15 on: July 12, 2010, 09:04:16 am »
I've been playing with this payment mod for a few days now and it's definitely well done.  However, it doesn't seem to log payment information on the backend, especially if the transaction was declined.  Was it meant to do this, or was this not implemented?

I'm still trying to figure out what exactly is done on the beanstream end of things and what needs to be implemented directly from our end.  In testing though, it has generally worked well.

rwcorbett

  • Beginner
  • *
  • Posts: 18
Re: Beanstream payment method for Virtuemart
« Reply #16 on: July 15, 2010, 15:12:46 pm »
Thanks @Syn!

I haven't implemented American Express... is that maybe something that BeanStream does?

As for backend logging... it wasn't a requirement for my client so I didn't implement it.

It really shouldn't bee too difficult if you know your way around PHP and MySQL.

What is it that you are trying to do with backend logging specifically?

omineau

  • Beginner
  • *
  • Posts: 2
Re: Beanstream payment method for Virtuemart
« Reply #17 on: August 04, 2010, 22:03:05 pm »
Hi,

Is there a reason why this link:
http://rwc.cbwebco.com/rwcsvn/Beanstream%20Payment%20Method.v1.0.zip doesn't work?

Thanks

rwcorbett

  • Beginner
  • *
  • Posts: 18
Re: Beanstream payment method for Virtuemart
« Reply #18 on: August 05, 2010, 00:12:05 am »
sorry - try this: http://rwcorbett.ca/Beanstream%20Payment%20Method.v1.01.zip
moved some things on the server... SVN repo got changed.

everything here now:
https://github.com/rwcorbett/VirtueMart_Beanstream_Payment_Method

Syn

  • Beginner
  • *
  • Posts: 29
Re: Beanstream payment method for Virtuemart
« Reply #19 on: August 05, 2010, 21:22:39 pm »
Thanks @Syn!

I haven't implemented American Express... is that maybe something that BeanStream does?

As for backend logging... it wasn't a requirement for my client so I didn't implement it.

It really shouldn't bee too difficult if you know your way around PHP and MySQL.

What is it that you are trying to do with backend logging specifically?

I basically wanted to have the payment log recorded on the Virtuemart backend.  Your solutions works well, but in this partcular case I needed something that records the payment info on the backend and also prevents orders from being confirmed if the transaction is declined.

I implemented the other solution on this site, that was created a few years ago.  It seems to be working well.

rwcorbett

  • Beginner
  • *
  • Posts: 18
Re: Beanstream payment method for Virtuemart
« Reply #20 on: August 05, 2010, 21:24:30 pm »
@Syn

could you forward me the link to that solution! I must have missed it (hence I wrote this) and would like to try it out  ;D

thanks in advance!

omineau

  • Beginner
  • *
  • Posts: 2
Re: Beanstream payment method for Virtuemart
« Reply #21 on: August 05, 2010, 22:44:16 pm »
Thanks for the link.

kraymitchell

  • Beginner
  • *
  • Posts: 17
Re: Beanstream payment method for Virtuemart
« Reply #22 on: August 20, 2010, 20:28:49 pm »
Has anything been done on this mod for the backend payment info being recorded? Wouldn't want confirmations sent out when they were declined!


GooRu

  • Jr. Member
  • **
  • Posts: 145
  • Joomla Web Development, all day everyday.
    • Web GooRu Joomla Development and Hosting
Re: Beanstream payment method for Virtuemart
« Reply #23 on: April 28, 2011, 19:48:09 pm »
Hi...

Any chance you have some code that does not transfer to Beanstream but does it on site?

Curt


Hi there all,

I have worked up a new payment method to communicate with Beanstream (also works with TD Canada Trust's OnlineMart)

It is based on the built-in PayPal module and is a variation on the idea given to me by erikas_boy (gotta give credit where credit is due - thanks Chris!)

Everything you need - including setup examples - should be in the .zip


Code: [Select]
* Beanstream Payment Processing Plugin
* - takes the customer offsite to enter in the creditcard info on Beanstream's server
* - the DB is queried to auto-fill most of the sections on the form
* - the payment form option for "Allow Price Modification" should be set to 'no' on your
*   Beanstream control panel
* - HOW TO INSTALL: (see images included in the zip)
* 1) YOU WILL NEED TO FILL YOU MERCHANT ID IN ON LINE 51 below.
* 2) create a new payment method using payment class = ps_payment & method type = HTML-Form based
* 3) copy and paste this entire PHP block (line 1 to line 70) into the configuration block
*
* based on the PayPal module that is included with VirtueMart
* date: 16 Dec, 2009
* written by Robb Corbett / Cape Breton Web Design
* (c) Robb Corbett / Cape Breton Web Design
* contact me at: robb@cbwebco.com -or- robb.corbett@gmail.com
* if you choose to use this implementation you are welcome to, but please leave this header
*   inplace. I assume no liability for the functioning of this module on your site.

{edit: fixed url, again} HERE IS A LINK TO THE FILE : http://rwcorbett.ca/Beanstream%20Payment%20Method.v1.1.zip

Just so you know - I don't really have time to maintain this... and am busy so if I don't reply to your questions then it's not because I don't like you, it's because I am too busy! This is released under the MIT Licence so you can use it however you want, but I will not be officially supporting it.

Have Fun!  ;)

-Robb

robb [at] cbwebco.com
www.capebretonwebdesign.com
Joomla Web Development, Hosting and site management

bkfish

  • Beginner
  • *
  • Posts: 1
Re: Beanstream payment method for Virtuemart
« Reply #24 on: September 21, 2011, 07:12:24 am »
Has anyone got a finished and ready to go version of this?

GooRu

  • Jr. Member
  • **
  • Posts: 145
  • Joomla Web Development, all day everyday.
    • Web GooRu Joomla Development and Hosting
Re: Beanstream payment method for Virtuemart
« Reply #25 on: September 21, 2011, 16:30:58 pm »
There is a company that will write the gateway for $200. Anyone want to get in on it?

This will be for a Beanstream gateway that transacts on the clients site.
Joomla Web Development, Hosting and site management

madscience

  • Jr. Member
  • **
  • Posts: 62
Re: Beanstream payment method for Virtuemart
« Reply #26 on: January 10, 2013, 04:27:45 am »
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