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

Hi @apiLgendaryd8a

 

Have you tried testing your request in our Try it Tab  

 

https://developer.authorize.net/api/reference/index.html#customer-profiles-update-customer-payment-p...

 

Thanks





Send feedback at developer_feedback@authorize.net
Anurag
Moderator Moderator
Moderator

I will.   Should that provide details on the missing data or the error/issue?  

 

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.

quick follow up:

 

 The 'Try It' is taking mark up.  Or am I missing something?  

 

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. 

 

 Nor have I found the details on how to generate what I think might be the field(s). 

 

Specifically:

 

 

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.

 

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.

 

 What is  the encrypted payment data and meta data for the encryption keys? 

 

again thanks for your time on this 

 

I  got a message this AM about the details here.

 

 I do not get a resolution from the response.

 

###

follow up:

 

 The 'Try It' is taking mark up.  Or am I missing something?  

 

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. 

 

 Nor have I found the details on how to generate what I think might be the field(s). 

 

Specifically:

 

 

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.

 

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.

 

 What is  the encrypted payment data and meta data for the encryption keys? 

 

Again thanks for your time on this.

 

 

 

I do not get a resolution from the response.

 

###

follow up:

 

If I follow the try it there still an error .  using (with data abstracted ...)

 

<updateCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>{{apiLoginId}}</name>
<transactionKey>{{transactionKey}}</transactionKey>
</merchantAuthentication>
<clientId>sdk-java-1.9.1</clientId>
<customerProfileId>{{profileId}}</customerProfileId>
<paymentProfile>
<payment>
<creditCard>
<cardNumber>5424000000000015</cardNumber>
<expirationDate>0923</expirationDate>
</creditCard>
</payment>
<customerPaymentProfileId>{{paymentProfileId}}</customerPaymentProfileId>
</paymentProfile>
<validationMode>liveMode</validationMode>
</updateCustomerPaymentProfileRequest>

 

 

## The response is not enough at this point to go on:

<?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>
</messages>
<validationDirectResponse>
3,1,290,There is one or more missing or invalid required fields.,,P,0,none,Test transaction for ValidateCustomerPaymentProfile.,0.00,CC,auth_only,LDL_larry@larry.com,,,,,,,,,,,larry@larry.com,,,,,,,,,0.00,0.00,0.00,FALSE,none,680428DA3C093F9DC2FE27B93E9DCCEA,,,,,,,,,,,,,XXXX0015,MasterCard,,,,,,,,,,,,,,,,,
</validationDirectResponse>
</updateCustomerPaymentProfileResponse>

 

## 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 merchantProfileId as 'LDL_larry@larry.com' ...) was done with the code.

 

[] I can make chages with the appropriate paymentProfileId successfully

 

[] I canget 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. 

 

 Nor have I found the details on how to generate what I think might be the field(s). 

 

Specifically:

 

 

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.

 

Can you provide some more details or examples of use?

 

Is this what is missing?

 

Also, a pointer to the details in the documentation so I can better dig into this and any potential

future needs?

 

Thanks.

 

 What is  the encrypted payment data and meta data for the encryption keys? 

 

Again thanks for your time on this.

 

###

#    Summary

###
- can create a customerProfile and a customerPaymentProfile

- can charge with existing profile details 

- can getCustomerPaymentProfile

 

*** Unable to updatePaymentProfile

 

Goal = with profileId, paymentProfileId  AND update CreditCard for billing.

 

 

 

an additional note:

 

 The sample data (below for reference)

 does not have 

 

opaqueData

 dataDescriptor

  dataValue

 

That I see.

 

 AND 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.

 

 

 

 

 

###
<updateCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>API_LOGIN_ID</name>
<transactionKey>API_TRANSACTION_KEY</transactionKey>
</merchantAuthentication>
<customerProfileId>10000</customerProfileId>
<paymentProfile>
<billTo>
<firstName>John</firstName>
<lastName>Doe</lastName>
<company></company>
<address>123 Main St.</address>
<city>Bellevue</city>
<state>WA</state>
<zip>98004</zip>
<country>USA</country>
<phoneNumber>000-000-0000</phoneNumber>
<faxNumber></faxNumber>
</billTo>
<payment>
<creditCard>
<cardNumber>4111111111111111</cardNumber>
<expirationDate>2026-01</expirationDate>
</creditCard>
</payment>
<defaultPaymentProfile>false</defaultPaymentProfile>
<customerPaymentProfileId>20000</customerPaymentProfileId>
</paymentProfile>
<validationMode>liveMode</validationMode>
</updateCustomerPaymentProfileRequest>

 

v-ping

 

Any thoughts/feedback/updates or additional information needed?

another virtual ping here.

 

@Anurag Any thoughts/feedback/updates or additional information needed?

Hi @apiLgendaryd8a

 

opaque data is for passing the digital payments tokens like Apple Pay , Andriod Pay , Visa checkout . 

 

For more details check https://developer.authorize.net/api/reference/features/in-app.html#Apple_Pay

 

https://developer.authorize.net/api/reference/features/visa_checkout.html

 

https://developer.authorize.net/api/reference/features/acceptjs.html#Using_the_Payment_Nonce_in_an_A...

 

Also can you clearly summarize what other issue you having with Customer API ?

 

Thanks





Send feedback at developer_feedback@authorize.net