URL Generator: VB

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

' *
' * Bluepay VB.NET Sample code.
' *
' * This code sample runs a report that grabs a single transaction
' * from the BluePay gateway based on certain criteria.
' * See comments below on the details of the report.
' * If using TEST mode, only TEST transactions will be returned.
' *

Imports System
Imports vbnet.BPVB

Namespace Sample

    Public Class URLGeneratorMethodSample

        Public Shared Sub run()

            Dim accountID As String = "Merchant's Account ID Here"
            Dim secretKey As String = "Merchant's Secret Key Here"
            Dim mode As String = "TEST"

            Dim testURL As BluePay = New BluePay(
            Dim generatedURL As String = testURL.generateURL(
              merchantName:= "Test Merchant",
              returnURL:= "www.google.com",
              transactionType:= "SALE",
              acceptDiscover:= "Yes",
              acceptAmex:= "Yes",
              amount:= "99.99",
              protectAmount:= "Yes",
              rebilling:= "Yes",
              rebProtect:= "Yes",
              rebAmount:= "50",
              rebCycles:= "12",
              rebStartDate:= "1 MONTH",
              rebFrequency:= "1 MONTH",
              customID1:= "MyCustomID1.1234",
              protectCustomID1:= "Yes",
              customID2:= "MyCustomID2.12345678910",
              protectCustomID2:= "Yes",
              paymentTemplate:= "mobileform01",
              receiptTemplate:= "defaultres2",
              receiptTempRemoteURL:= ""

            Console.WriteLine("Hosted Payment Form URL: " + generatedURL)
        End Sub
    End Class
End Namespace
Can’t find what you’re
looking for? We can help.

Contact 800-350-2684 for Integration Support.

  • Microsoft Gold Partner Badge
  • 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
  • Best in Biz Awards 2018 Silver Winner Badge for Business Development Department of the Year
  • TSG Gateway Awards 2019 BluePay
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.