Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

method getSubscriptionId() not defined . #455

Open
ipalenciab opened this issue Feb 3, 2024 · 0 comments
Open

method getSubscriptionId() not defined . #455

ipalenciab opened this issue Feb 3, 2024 · 0 comments

Comments

@ipalenciab
Copy link

Hi expert, I'm using laravel and I'm creating a Recurring Billing in sandbox, After a few hour of fighting i literally copy and paste the sample code and just add my sandbox credentials to it sample: [(https://github.com/AuthorizeNet/sample-code-php/blob/master/RecurringBilling/create-subscription.php)]

I'm getting the error undefined method getSubscriptionId() by IntelliSense corrector.

the following line suppose to return a CreateTransactionResponse object , correct? :
$response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);

if i create a var instance of CreateTransactionResponse , i can get the method but not with $response that suppose to be the same type.
so here it line 68 i got the erro:
echo "SUCCESS: Subscription ID : " . $response->getSubscriptionId() . "\n";
and I'm not able to get access to the SubscriptionId to store it.
any help please.

version informations:
I'm using php 8.2.14 authorizenet 2.0 laravel framework 8.83 the Recurring Billing is created and it response form the API is "Ok", but I'm not able to get the SubscriptionId due to this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant