So I'm trying to integrate my web app with Paypal payment gateway for them to subscribe to my service for a fee but I seem to be stuck with some problems.
Just so you know, I'm on Laravel Framework.
This is the intended flow.
1) Users get to choose a subscription or a monthly payment.
2) Once users choose their plan, they proceed to pay.
3) Once they have paid, they can gain full access.
So far, I'm done with the payment. As in the user can be directed to Paypal and be paid to the exact amount that I've intended them to pay and if they choose the subscription, Paypal is able to charge them monthly or yearly according to the subscription. I'm returned with the Order and Subscription ID.
Sounds easy and I'm stuck right? Well, here's where I am stuck at.
1) For subscription basis, I am supposed to charge them for instance, USD99/yearly and I need to capture the returned response from Paypal. Apparently this is done with webhook. I've searched high and low what is webhook and I can't get it to work/understand. Please someone can teach me in layman's term what is webhook and how to "trigger" it.
2) There's a trial plan which I need to do the usual which is charging them USD1 and then cancel the order but I can't seem to do it as it says I need a capture ID but I do not have it anywhere.
These are my sources
1) REST API
2) Smart Payment Button
It would be great if any sifu here is able to help me. Thanks!
Integrating paypal + webhook