Hi,
i was trying to create customer profile (along with customer payment profile) on invoking "Charge a Credit Card" API.
CustomerProfilePaymentType customerProfilePaymentType = new CustomerProfilePaymentType(); Boolean isCreateProfile = true; customerProfilePaymentType.setCreateProfile(isCreateProfile); // Create the payment transaction request TransactionRequestType txnRequest = new TransactionRequestType(); txnRequest.setTransactionType(TransactionTypeEnum.AUTH_CAPTURE_TRANSACTION.value()); txnRequest.setPayment(paymentType); txnRequest.setAmount(new BigDecimal(amount).setScale(2, RoundingMode.CEILING)); txnRequest.setProfile(customerProfilePaymentType);
my payment was successfull, but failed to create a profile. am getting an error "One or more fields must contain a value".
I want to know how to set those fields in java code.
kindly help me in this.
Thanks,
Suresh Babu R
03-21-2018 12:35 AM
Hi ,
For charge credit card transaction please refer to the charge credit card in the sample code.
You need to set up the customer (CustomerDataType) field in the transactionRequest for creating a customer profile (otherwise you'll get a 'customer info is missing' error). Also make sure your paymentType has all the required fields.
03-22-2018 02:26 AM - edited 03-22-2018 02:27 AM