I'm trying to use "userFields" in createTransactionRequest of Accept hosted iFrame form to send and recieve data back after the transaction is completed. I keep getting "Unexpected Error. Please try again" message when I submit the form.
{"resultCode":"Error","messageCode":"E00001","messageText":"Unexpected error. Please try again.","token":null,"transactionData":null,"userFields":null,"createPaymentProfileResponse":null}
Below is the code snipet from my java code.
UserFields userFields = new UserFields(); UserField usField = new UserField(); usField.setName("TestUserFieldName"); usField.setValue("TestUserFieldValus"); userFields.getUserField().add(usField);
TransactionRequestType txnRequest = new TransactionRequestType();
txnRequest.setUserFields(userFields);
Am I missing something?
07-10-2018 12:31 PM
Does it work when you do not include the user fields? I just tested same (not in java) and worked fine.
07-11-2018 10:28 AM
Yes, it works correctly when I do not include userFields in my transactionRequest.
07-20-2018 02:32 PM
Hi @ashish1871,
Even though the SDK includes methods to set and get custom User fields, also known as Merchant Defined fields, the new API does not handle them. (see this thread)
It is interesting that attempting to include them now produces an error. That is better than what was happening previously, which is that the fields and their values simply disappeared into the ether, never to return, leading to some serious head scratching.
08-10-2018 12:45 PM - last edited on 08-10-2018 04:15 PM by RichardH