URL Generator

This code steps you through the basics of generating a URL on-the-fly to one of BluePay's Simple Hosted Payment Forms (SHPF).

The following sample code calls a routine from our Code Library.
Download BluePay.vb
Or, download via GitHub

use strict;
use bluepay;


my $account_id = "Merchant's Account ID Here";
my $secret_key = "Merchant's Secret Key Here";
my $mode = "TEST";

my $test_url = BluePay->new(
$account_id,
$secret_key,
$mode
);

my $generated_url = $test_url->generate_url({
merchant_name => "Test Merchant",
return_url => "www.google.com",
transaction_type => "SALE",
accept_discover => "Yes",
accept_amex => "Yes",
amount => "99.99",
protect_amount => "Yes",
rebilling => "Yes",
reb_protect => "Yes",
reb_amount => "50",
reb_cycles => "12",
reb_start_date => "1 MONTH",
reb_frequency => "1 MONTH",
custom_id => "MyCustomID1.1234",
protect_custom_id => "Yes",
custom_id2 => "MyCustomID2.12345678910",
protect_custom_id2 => "Yes",
payment_template => "mobileform01",
receipt_template => "defaultres2",
receipt_temp_remote_url => ""
});

print "Hosted Payment Form URL: " . $generated_url;
Can’t find what you’re
looking for? We can help.

Contact 800-350-2684 for Integration Support.

  • Microsoft Gold Partner Badge
  • Susan G. Komen for the Cure Supporter
  • 2018 American Business Awards Gold Stevie® Winner Badge for Best Payment and Electronic Commerce Solution
  • 2018 CNP Awards Customer Choice Winner Badge for Best E-Commerce Platform/Gateway
  • 2017 TSG Gateway Awards Winner Badge for Best Onboarding Process
  • Best in Biz Awards 2018 Silver Winner Badge for Business Development Department of the Year
BluePay Processing, LLC is a registered ISO of Wells Fargo Bank, N.A., Concord, CA, 94524 U.S.A.
BluePay Canada ULC, is a Registered ISO/MSP of Peoples Trust Company, Vancouver, Canada.