I am using the java sdk.
https://github.com/AuthorizeNet/sdk-java
I am using accept.js to send credit card to authorize.net via javascript and then in server side i execute accept payment transaction call as described in the following documentation.
https://developer.authorize.net/api/reference/index.html#payment-transactions-create-an-accept-payme...
I have a chunk of code below for populating customer billing information. I set all information such as firstname, lastname, address, email etc.
CustomerAddressType customerType = new CustomerAddressType()
customerType.setFirstName(firstName)
customerType.setLastName(lastName)
customerType.setAddress(address)
customerType.setCity(city)
customerType.setState(state)
customerType.setZip(zip)
customerType.setCountry(country)
customerType.setPhoneNumber(phone)
customerType.setEmail(email)
// Create the payment transaction request
TransactionRequestType txnRequest = new TransactionRequestType();
txnRequest.setTransactionType(TransactionTypeEnum.AUTH_CAPTURE_TRANSACTION.value());
txnRequest.setPayment(paymentType);
txnRequest.setBillTo(customerType)
txnRequest.setAmount(total.setScale(2, RoundingMode.CEILING));
// Make the API Request
CreateTransactionRequest apiRequest = new CreateTransactionRequest();
apiRequest.setTransactionRequest(txnRequest);
CreateTransactionController controller = new CreateTransactionController(apiRequest);
controller.execute();
CreateTransactionResponse tresponse = controller.getApiResponse();
The problem is that i cannot set the email field. All other fields appear in the transaction but email field is always blank. This hapens both in sandbox as well as production. So i am wondering if i have missed anything that is preventing me to set the email field? I appreciate any help! Thanks!
Since i am not being able to paste the image i have uploaded to an external images host. Please see the image in this link
https://ibb.co/daRQnx