Hello,
// set credit card details var creditCard = new ApiContracts.CreditCardType(); creditCard.setCardNumber(cardData.cardNumber); creditCard.setExpirationDate( cardData.expirationMonth + cardData.expirationYear ); creditCard.setCardCode(cardData.cvv); // set payment method var paymentType = new ApiContracts.PaymentType(); paymentType.setCreditCard(creditCard); var customerPaymentProfileType = new ApiContracts.CustomerPaymentProfileType(); customerPaymentProfileType.setCustomerType( ApiContracts.CustomerTypeEnum.INDIVIDUAL ); // set payment type customerPaymentProfileType.setPayment(paymentType); // set customer address as billing details customerPaymentProfileType.setBillTo(customerAddress); customerPaymentProfileType.setDefaultPaymentProfile(true); var profileToCharge = new ApiContracts.CustomerProfilePaymentType(); profileToCharge.setCustomerProfileId(currentUser.customerProfileId); const transactionSettings = new ApiContracts.ArrayOfSetting([ { settingName: ApiContracts.SettingNameEnum.DUPLICATEWINDOW, settingValue: 0, }, ]); var transactionRequestType = new ApiContracts.TransactionRequestType(); transactionRequestType.setTransactionType( ApiContracts.TransactionTypeEnum.AUTHCAPTURETRANSACTION ); transactionRequestType.setProfile(profileToCharge); transactionRequestType.setAmount(price.toFixed(2)); transactionRequestType.setLineItems(lineItems); transactionRequestType.setOrder(orderDetails); transactionRequestType.setShipTo(shipTo); transactionRequestType.setBillTo(billTo); transactionRequestType.setTransactionSettings(transactionSettings);
02-21-2019 05:18 AM
Hello @sonuchapter247
Are you experiencing this issue in the sandbox or your live production account?
Richard
02-21-2019 07:00 PM
@RichardH This is same in both Sandbox and Production.
02-23-2019 02:16 AM