Closed alfredobp closed 2 years ago
Hello, I am trying to create a recurring payment and I have problems when instantiating the class, it gives me this error:
MangoPay\Libraries\Exception PaymentDetails is not defined or it is not object type
And the code is:
$PayRecurrent = new \MangoPay\PayInRecurringRegistration(); $PayRecurrent->AuthorId = Auth::user()->mangopay_id; $PayRecurrent->CardId = $CardRegistration->CardId; $PayRecurrent->CreditedWalletId = '11649975'; $PayRecurrent->FirstTransactionDebitedFunds = session('amount') * 100; $PayRecurrent->FirstTransactionFees = 0; $PayRecurrent->PaymentDetails = 'Cargo'; $result = $this->mangopay->PayIns->Create($PayRecurrent);
I think that the problem is in this line: $result = $this->mangopay->PayIns->Create($PayRecurrent);
I work with php SDK in laravel project. Thanks.
Hi. That's because you don't have to add PaymentDetails. There's an example in the tests with how you create a PayInRecurringRegistration. See here
Hello, I am trying to create a recurring payment and I have problems when instantiating the class, it gives me this error:
MangoPay\Libraries\Exception PaymentDetails is not defined or it is not object type
And the code is:
I think that the problem is in this line: $result = $this->mangopay->PayIns->Create($PayRecurrent);
I work with php SDK in laravel project. Thanks.