AuthorizeNet / sample-code-php

This repository contains working code samples which demonstrate php integration with the Authorize.Net API
MIT License
175 stars 197 forks source link

Create Customer Profile not returning address ID #97

Closed KevinBatdorf closed 7 years ago

KevinBatdorf commented 7 years ago

Using code from create-customer-profile.php the $response->getCustomerShippingAddressIdList() is empty. That number is required for creating a subscription.

Further, I can't find any other request that will return this ID.

It would appear the billing is being accepted: screen shot 2017-07-16 at 5 56 35 pm

Maybe you can show how to create a subscription without hardcoding all the IDs? Thanks!

adavidw commented 7 years ago

Hi @KevinBatdorf,

I just updated the create-customer-profile.php sample to show an example of adding a shipping address. Once a shipping address is added into the profile, the getCustomerShippingAddressIdList() call should work as expected.

If anything else is unclear, please reopen this and let us know.

KevinBatdorf commented 7 years ago

Okay, I managed to get it to work. I guess what is unclear is why you need a shipping address to create a subscription. I'll just use the billing address as a shipping address and abstract it form the user.

Thanks for the assistance.