Friday, June 5, 2015

BlueBox and Stripe Payment Solutions

BlueBox Business System now has a formal plugin with Stripe (www.stripe.com)


Add the Stripe Account settings via Integration > Stripe. Here you need to insert your live and test keys - found in your Stripe account. You can also set it to run in Test/Live mode either via this settings panel or as a variable passed by the pay_button function.

One of the really nice features that the Stripe API allows is easy re-use of card details via secure tokens. This makes buyer's one-click purchasing is easily implemented using this new module.

The new plugin allows development of integrated payments within BlueBox using the Stripe API - by simply adding two lines of code:

$stripe=new bb_stripe();
resp($stripe->pay_button(array(
"email"=>$_SESSION[user][email],
"ref"=>$reload_order[order_number],
"name"=>"Payment for Order $reload_order[order_number]",
"amount"=>$reload_order[order_totalCUR]*100,
"success_url"=>"/?estore&global[p]=payment&global[success]=$reload_order[_apikey]",
"failure_url"=>"/?estore&global[p]=payment&global[failure]=$reload_order[_apikey]",
)));

No comments:

Post a Comment