cancel
Showing results for 
Search instead for 
Did you mean: 

Java CIM UpdateCustomerPaymentProfile ; Error E00027

Authrorize.net – UpdateCustomerPaymentProfile()

 

Gettting an Error = <DEBUG> [UpdateCustomerPaymentProfile()] There is one or more missing or invalid required fields.

 

in the log = << "?xml version="1.0" encoding="utf-8"?><updateCustomerPaymentProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00027</code><text>There is one or more missing or invalid required fields.</text></message>

 

See below. I believe it is related to the fields that are noted as Required, though I yet have found no details on the information to set them (specifically, the dataValue).

 

can you help or provide direction to more details?

 

 

In the documentation I see :

 

 

opaqueData

Required.
Contains dataDescriptor and dataValue.

 

dataDescriptor

Required.
Specifies how the request should be processed.

The value of dataDescriptor is based on the source of the value of dataValue.

String, 128 characters.

Use COMMON.ACCEPT.INAPP.PAYMENTfor Accept transactions.

dataValue

Required.
Base64 encoded data that contains encrypted payment data.

The payment gateway expects the encrypted payment data and meta data for the encryption keys.

String, 8192 characters.

 

I do not see details for this in the sample code. (see = https://developer.authorize.net/api/reference/index.html#customer-profiles-update-customer-payment-p...) Can you provide some more details or examples of use. Also, a pointer to the details in the documentation so I can better dig into this and any potential

future needs? Thanks.

 

The code I am using is:

 

public static String UpdateCustomerPaymentProfile(String apiLoginId, String transactionKey, String profileId, String profilePaymentId, String cc,String exp,String cvc) throws IOException {

ApiOperationBase.setEnvironment(Environment.SANDBOX);

 

MerchantAuthenticationType merchantAuthenticationType = new MerchantAuthenticationType() ;

merchantAuthenticationType.setName(apiLoginId);

merchantAuthenticationType.setTransactionKey(transactionKey);

ApiOperationBase.setMerchantAuthentication(merchantAuthenticationType);

//

CreditCardType creditCard = new CreditCardType();

creditCard.setCardNumber(cc);

creditCard.setExpirationDate(exp); //dh - form here is MMYY , like 0822

//creditCard.setExpirationDate("2022-08"); //dh - Test, here the form is YYYY-MM ? => did not fix

 

PaymentType paymentType = new PaymentType();

paymentType.setCreditCard(creditCard);

 

CustomerPaymentProfileExType customer = new CustomerPaymentProfileExType();

customer.setPayment(paymentType);

customer.setCustomerPaymentProfileId(profilePaymentId);

//

UpdateCustomerPaymentProfileRequest apiRequest = new UpdateCustomerPaymentProfileRequest();

apiRequest.setCustomerProfileId(profileId);

apiRequest.setPaymentProfile(customer);

apiRequest.setValidationMode(ValidationModeEnum.LIVE_MODE);

//

UpdateCustomerPaymentProfileController controller = new UpdateCustomerPaymentProfileController(apiRequest);

controller.execute();

//

UpdateCustomerPaymentProfileResponse response = new UpdateCustomerPaymentProfileResponse();

response = controller.getApiResponse();

 

if (response!=null) {

if (response.getMessages().getResultCode() == MessageTypeEnum.OK) {

System.out.println(response.getMessages().getMessage().get(0).getCode());

System.out.println(response.getMessages().getMessage().get(0).getText());

}

else

{

String txt = "Failed to update customer payment profile: " + response.getMessages().getResultCode();

System.out.println("<DEBUG> [UpdateCustomerPaymentProfile()] " + txt);

txt = response.getMessages().getMessage().get(0).getText();

System.out.println("<DEBUG> [UpdateCustomerPaymentProfile()] " + txt);

throw new IOException(txt);

}

}

String txt = "Code=" + response.getMessages().getMessage().get(0).getCode() + ", message=" + response.getMessages().getMessage().get(0).getText();

return txt;

}

 

 

What other details or information is needed or that I should provide?

Is this enough detail?

What is next?

 

 

thanks for your time.

apiLgendaryd8a
Contributor
11 REPLIES 11

Hello Anurag,

 

   Thanks for the details.  The update I was testing was not using Apple Pay, Android Pay nor Visa Checkout.  

 

 Is it required?  Or what might be the missing data if not?  

 

 Could be address data is needed?  

 However, the details back from the getCustomerPaymentProfile for the specific paymentProfileId that I am testing with and can make charges successfully with , have billTo items like firstname returning null.

 

 

Authrorize.net – UpdateCustomerPaymentProfile()

 

Gettting an Error = <DEBUG> [UpdateCustomerPaymentProfile()] There is one or more missing or invalid required fields.

 

in the log = << "?xml version="1.0" encoding="utf-8"?><updateCustomerPaymentProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><messages><resultCode>Error</resultCode><message><code>E00027</code><text>There is one or more

missing or invalid required fields.</text></message>

 

--

## Some details --- (Also, let me know if and what additional information I can provide OK?)

 

I can:

 

[] create a new customers, and this profileId (with my example merchantProfileId as 'LDL_larry@larry.com' ...) was done with the code.

 

[] I can make chages with the appropriate paymentProfileId successfully

 

[] I can get the details back from getCustomerPaymentProfile() .  In this customer case values like response.getMessages().getMessage().get(0).getText() are coming back null.  

 

 

###

I am trying to isolate the java code.  I do not find, yet, enough detail on the reported missing or invalid required fields to know what specifically is the issue. 

 

 

###

A summary:

 

 I am trying to update the credit card data for an existing CustomerProfileId and  CustomerPaymentProffileId.   

 

- I can create a customerProfile and a customerPaymentProfile

- I can charge with existing profile details 

- I can getCustomerPaymentProfile

 

*** Unable to updatePaymentProfile

 

Goal = with CustomerprofileId, CustomerpaymentProfileId  AND update CreditCard for billing. in java

 

 

Again thanks for your time on this.

 

###

I am trying to isolate the java code.  I do not find, yet, enough detail on the reported missing or invalid required fields to know what specifically is the issue. 

 

 

###

A summary:

 

 I am trying to update the credit card data for an existing CustomerProfileId and  CustomerPaymentProffileId.   

 

- I can create a customerProfile and a customerPaymentProfile

- I can charge with existing profile details 

- I can getCustomerPaymentProfile

 

*** Unable to updatePaymentProfile

 

Goal = with CustomerprofileId, CustomerpaymentProfileId  AND update CreditCard for billing. in java

 

 

Again thanks for your time on this.