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.
11-25-2015 09:07 AM
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
11-25-2015 09:48 AM
Hi there,
Thanks for the feedback. See the update here: https://github.com/AuthorizeNet/sample-code-java/commit/70ed0afa3aea56fd383b6d6edf7acf655ee6c599
Cheers,
Brian
11-29-2015 06:27 AM