13.01.2013 Views

Connecting to PaymentTrust's Secure Transaction Network - WorldPay

Connecting to PaymentTrust's Secure Transaction Network - WorldPay

Connecting to PaymentTrust's Secure Transaction Network - WorldPay

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VB code sample<br />

Communication with STLink can be performed via the Internet Transfer Control.<br />

The following code fragment illustrates sending of HTTPS GET/POST data <strong>to</strong> STLink. Both<br />

examples assume the Internet Transfer Control is called ‘Inet’. HTTP data is similar except<br />

references <strong>to</strong> HTTPS are directed <strong>to</strong> HTTP.<br />

Transmission via HTTPS GET<br />

Dim URL As String<br />

URL = "<br />

https://www.paymenttrust.ca/stlinkssl/test/stlink.dll?StringIn=VersionUsed^3~MerchantId^100000<br />

~UserName^Mariah~UserPassword^rr87uy~<strong>Transaction</strong>Type^RG~IsTest^1~TimeOut^60000~M<br />

OP^CC~AcctName^John<br />

Smith~AcctNumber^4459510002561039~ExpDate^092010~CurrencyId^840~Amount^56.78~Firs<br />

tName^John~LastName^Smith~Address1^2130 Gold~City^New<br />

York~CountryCode^US~PhoneNumber^6188565656~REMOTE_ADDR^205.188.146.23"<br />

' this routine sends a string <strong>to</strong> STLink using a GET method and assigns the returned data <strong>to</strong> a text<br />

box<br />

Inbox.Text = Inet1.OpenURL(URL) + vbCrLf<br />

Transmission via HTTPS POST<br />

Dim POSTstring As String<br />

Dim URL As String<br />

POSTstring = "<br />

https://www.paymenttrust.ca/stlinkssl/test/stlink.dll?StringIn=VersionUsed^3~MerchantId^100000<br />

~UserName^Mariah~UserPassword^rr87uy~<strong>Transaction</strong>Type^RG~IsTest^1~TimeOut^60000~M<br />

OP^CC~AcctName^John<br />

Smith~AcctNumber^4459510002561039~ExpDate^092010~CurrencyId^840~Amount^56.78~Firs<br />

tName^John~LastName^Smith~Address1^2130 Gold~City^New<br />

York~CountryCode^US~PhoneNumber^6188565656~REMOTE_ADDR^205.188.146.23"<br />

' This routine sends a string <strong>to</strong> STLink using a POST method<br />

' Note: POST requests do not have query strings appended <strong>to</strong> the URL<br />

URL = "https://www.paymenttrust.ca/stlinkssl/test/stlink.dll"<br />

Inet1.Execute URL, "POST", POSTstring<br />

268

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!