AuthorizeNet / sample-code-php

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

How do I get the payment profile ID out of ARBGetSubscriptionRequest? #34

Closed safrick closed 8 years ago

safrick commented 8 years ago

How do I get the payment profile ID out of ARBGetSubscriptionRequest using the PHP SDK?

It's not shown in the sample listed at https://github.com/AuthorizeNet/sample-code-php/blob/master/RecurringBilling/get-subscription.php

ashtru commented 8 years ago

echo "Customer payment Profile ID: ". $response->getSubscription()->getProfile()->getPaymentProfile()->getCustomerPaymentProfileId() . "\n";

ARBGetSubscriptionResponse has subscription of type ARBSubscriptionMaskedType which has profile of type SubscriptionCustomerProfileType which has getPaymentProfile() of type CustomerPaymentProfileMaskedType which has getCustomerPaymentProfileId()