public RequestMessage applePayAuthRequest() { RequestMessage request = new RequestMessage(); // we will let the client pick up the merchantID // from the config file. In multi-merchant scenarios, // you would set a merchantID in each request. // this sample requests auth of apple pay // Credit Card Authorization request.ccAuthService = new CCAuthService(); request.ccAuthService.run = "true"; request.ccAuthService.cavv = "ABCDEFabcdefABCDEFabcdef0987654321234567"; request.ccAuthService.commerceIndicator = "internet"; request.ccAuthService.xid = "ABCDEFabcdefABCDEFabcdef0987654321234567"; // add required fields request.merchantReferenceCode = "your_merchant_reference_code"; BillTo billTo = new BillTo(); billTo.firstName = "John"; billTo.lastName = "Doe"; billTo.street1 = "1295 Charleston Road"; billTo.city = "Mountain View"; billTo.state = "CA"; billTo.postalCode = "94043"; billTo.country = "US"; billTo.email = "*****@*****.**"; billTo.ipAddress = "10.7.111.111"; request.billTo = billTo; Card card = new Card(); card.accountNumber = "4111111111111111"; card.expirationMonth = "12"; card.expirationYear = "2020"; request.card = card; PurchaseTotals purchaseTotals = new PurchaseTotals(); purchaseTotals.currency = "USD"; request.purchaseTotals = purchaseTotals; // there are two items in this sample request.item = new Item[2]; Item item = new Item(); item.id = "0"; item.unitPrice = "12.34"; request.item[0] = item; item = new Item(); item.id = "1"; item.unitPrice = "56.78"; request.item[1] = item; PaymentNetworkToken paymentNetworkToken = new PaymentNetworkToken(); paymentNetworkToken.transactionType = "1"; request.paymentNetworkToken = paymentNetworkToken; request.paymentSolution = "001"; // add optional fields here per your business needs return(request); }
public RequestMessage paymentNetworkTokenizationRequest() { RequestMessage request = new RequestMessage(); // we will let the client pick up the merchantID // from the config file. In multi-merchant scenarios, // you would set a merchantID in each request. // this sample requests // Credit Card Authorization request.ccAuthService = new CCAuthService(); request.ccAuthService.run = "true"; request.ccAuthService.commerceIndicator = "vbv"; request.ccAuthService.cavv = "EHuWW9PiBkWvqE5juRwDzAUFBAk="; request.ccAuthService.xid = "EHuWW9PiBkWvqE5juRwDzAUFBAk="; request.merchantReferenceCode = "your_merchant_reference_code"; UCAF ucaf = new UCAF(); ucaf.authenticationData = "EHuWW9PiBkWvqE5juRwDzAUFBAk="; ucaf.collectionIndicator = "2"; request.ucaf = ucaf; BillTo billTo = new BillTo(); billTo.firstName = "John"; billTo.lastName = "Doe"; billTo.street1 = "1295 Charleston Road"; billTo.city = "Mountain View"; billTo.state = "CA"; billTo.postalCode = "94043"; billTo.country = "US"; billTo.email = "*****@*****.**"; billTo.ipAddress = "10.7.111.111"; request.billTo = billTo; Card card = new Card(); card.accountNumber = "4650100000000839"; card.expirationMonth = "12"; card.expirationYear = "2031"; request.card = card; PurchaseTotals purchaseTotals = new PurchaseTotals(); purchaseTotals.currency = "USD"; request.purchaseTotals = purchaseTotals; // there are two items in this sample request.item = new Item[2]; Item item = new Item(); item.id = "0"; item.unitPrice = "12.34"; request.item[0] = item; item = new Item(); item.id = "1"; item.unitPrice = "56.78"; request.item[1] = item; PaymentNetworkToken paymentNetworkToken = new PaymentNetworkToken(); paymentNetworkToken.transactionType = "1"; request.paymentNetworkToken = paymentNetworkToken; return(request); }