Reply
Member
Posts: 2
Registered: ‎11-23-2015

JAVA Charge a Customer Profile is incorrect

I have pasted the example from http://developer.authorize.net/api/reference/#payment-transactions-charge-a-customer-profile below.

 

Notice that it creates a PaymentProfile object but never actually uses it, so this sample absolutely has nothing to do with a Customer Profile...

 

I believe it should be doing something along the lines of "

CustomerProfilePaymentType paymentType = new CustomerProfilePaymentType();
paymentType.setCustomerProfileId(apiLoginId);
PaymentProfile paymentProfile = new PaymentProfile();
paymentProfile.setPaymentProfileId(paymentProfileID);
paymentType.setPaymentProfile(paymentProfile);

txnRequest.setProfile(paymentType);

"

It is difficult to learn how to us an API when the samples are not correct.

 

 

 

Posts: 2,765
Topics: 57
Kudos: 251
Blog Posts: 67
Registered: ‎12-05-2011

Re: JAVA Charge a Customer Profile is incorrect

Hello @cjh

Could you please open an issue in GitHub for with this information.  It will notify the development team directly so they can promptly address your issue.

Richard

Administrator
Posts: 149
Registered: ‎03-28-2014

Re: JAVA Charge a Customer Profile is incorrect

Hi there,

 

Thanks for the feedback.  See the update here: https://github.com/AuthorizeNet/sample-code-java/commit/70ed0afa3aea56fd383b6d6edf7acf655ee6c599

 

Cheers,

 

Brian