Subscriptions Questions

Laraship QuestionsCategory: TechnicalSubscriptions Questions
A. A asked 6 years ago
Hello , 1- In the checkout page, if I click checkout ( the green button ) its show error, but when I click PayPal checkout button its work good. ( error is: The given data was invalid + Payment details are missing ) 2- After I pay for the subscription there is no invoice created, how to solve that? 3- How the cron for renewal works? do I need to add anything in the cronjob? 4- Which hooks are used for the following cases: a- after subscription end date and user not paid for renewal b- after user renewal success 5- When updating a plan I got: Update Gateway plan Failed Business error 6- I created a new plan with 0 trial day, but when I subscribe its give 7 days trial! Waiting for your reply Best regards
2 Answers
laraship Staff answered 6 years ago
Hello, Please find our answers inline: 1- In the checkout page, if I click checkout ( the green button ) its show error, but when I click PayPal checkout button its work good. ( error is: The given data was invalid + Payment details are missing ) Yes you need to checkout using Paypal first 2- After I pay for the subscription there is no invoice created, how to solve that? Invoices are generated using webhook calls, so you need to make sure hooks are configured correctly. 3- How the cron for renewal works? do I need to add anything in the cronjob? renewals and cancelations are all handled by webhook calls 4- Which hooks are used for the following cases:
a- after subscription end date and user not paid for renewal - after user renewal success renewals and cancelations are all handled by webhook calls
'PAYMENT.SALE.PENDING' => \Corals\Modules\Payment\PayPal\Job\HandleInvoiceCreated::class,
'PAYMENT.SALE.COMPLETED' => \Corals\Modules\Payment\PayPal\Job\HandleInvoicePaymentSucceeded::class,
'PAYMENT.SALE.DENIED' => \Corals\Modules\Payment\PayPal\Job\HandleInvoicePaymentFailed::class,
'BILLING.SUBSCRIPTION.CANCELLED' => \Corals\Modules\Payment\PayPal\Job\HandleCustomerSubscriptionDeleted::class,
5- When updating a plan I got: Update Gateway plan Failed Business error Its always recommended to cancel plan and create a new one as payment gateways are not fan of plans updates 6- I created a new plan with 0 trial day, but when I subscribe its give 7 days trial! this cannot happen, its probably old data
A. A replied 6 years ago

Hello,

Regarding point 2.:

Webhooks are well configured and when i test using paypal webhooks simulator its work fine with success result.

But when i go to laraship admin > webhooks calls i can’t find anything releated to paypal only stripe webhooks.

I change the event to * all events and the same thing.

I’ve sent some screenshots on email.

Best regards

laraship Staff replied 6 years ago

You need to monitor laravel log file and see if you run into any error

A. A replied 6 years ago

Hello,

There is no error appear regarding the hooks, Can you please check from your side?

Best regards

laraship Staff answered 6 years ago