Skip to content

method getSubscriptionId() not defined . #455

@ipalenciab

Description

@ipalenciab

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions