cancel
Showing results for 
Search instead for 
Did you mean: 

Accept Hosted iFrame userFields error

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?

 

ashish1871
Contributor
3 REPLIES 3

Does it work when you do not include the user fields?  I just tested same (not in java) and worked fine.

 

brianmc
Administrator Administrator
Administrator

Yes, it works correctly when I do not include userFields in my transactionRequest.

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.

coppercup
Regular Contributor