Last active
May 6, 2019 01:36
-
-
Save VantivSDK/2769036 to your computer and use it in GitHub Desktop.
.NET SDK - Litle ASP.NET Simple Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false" | |
CodeBehind="Default.aspx.vb" Inherits="VBLitleDemoWebApp._Default" %> | |
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> | |
Response Code: <asp:Label runat="server" id="LitleAuthResponseCode"></asp:Label><br /> | |
Response Message: <asp:Label runat="server" id="LitleAuthResponseMessage"></asp:Label><br /> | |
Response Transaction Id: <asp:Label runat="server" id="LitleAuthResponseLitleTxnId"></asp:Label><br /> | |
</asp:Content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports Litle.Sdk | |
Public Class _Default | |
Inherits System.Web.UI.Page | |
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load | |
Dim config As New Dictionary(Of String, String) | |
config.Add("url", "https://www.testvantivcnp.com/sandbox/communicator/online") | |
config.Add("reportGroup", "Default Report Group") | |
config.Add("username", "VBNETDEMO") | |
config.Add("version", "8.13") | |
config.Add("timeout", "65") | |
config.Add("merchantId", "101") | |
config.Add("password", "password") | |
config.Add("printxml", False) | |
config.Add("proxyHost", "smoothproxy") | |
config.Add("proxyPort", "8080") | |
Dim litle As New LitleOnline(config) | |
Dim auth As New authorization | |
auth.orderId = "1" | |
auth.amount = 1495 | |
auth.orderSource = orderSourceType.ecommerce | |
Dim billToAddress As New contact | |
billToAddress.name = "John Smith" | |
billToAddress.addressLine1 = "1 Main St." | |
billToAddress.city = "Burlington" | |
billToAddress.state = "MA" | |
billToAddress.zip = "01803-3747" | |
billToAddress.country = countryTypeEnum.US | |
auth.billToAddress = billToAddress | |
Dim card As New cardType | |
card.type = methodOfPaymentTypeEnum.VI | |
card.number = "4457010000000009" | |
card.expDate = "0112" | |
card.cardValidationNum = "349" | |
auth.card = card | |
Dim authResponse = litle.Authorize(auth) | |
LitleAuthResponseCode.Text = authResponse.response | |
LitleAuthResponseMessage.Text = authResponse.message | |
LitleAuthResponseLitleTxnId.Text = authResponse.litleTxnId | |
End Sub | |
End Class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment