cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

Create Profile Using Charge a Credit card API

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

sureshrb3
Contributor
Who Me Too'd this topic