I created a Subscription Plan using Paid&Get and then Subscription Very simple to Create Button and Copy code into my Website Pasted code like the following provided into my website and all good - just 5 mins work Questions: 1. How to test without making a real payment - its NOT clear creating a sandbox from this point as I am not in the Developer site at all! No documentation on testing if use use this facility for mins work to integrate. If I click the button, I need a PayPal account, but cant work if existing Paypal account as its Merchant account ME! who created it! Do I set up another PayPal Account? to Test (or ask a friend , and refund them?) Trying to avoid any more time in PayPal account, or not spend time in PayPal developer site ! If possible 2. Where to add a JavaScript function, (I guess where i have "here" below) so that I can send a event to my database so client who has logged in has paid!) - Its NOT a public site, they register and login, so I know all about them, just need to flip a switch in my database to say payment made. Any feedback would be helpful. paypal.Buttons({ style: { shape: 'pill', color: 'gold', layout: 'vertical', label: 'subscribe' }, createSubscription: function(data, actions) { //here <-------------------------------- Attempt to pay! return actions.subscription.create({ 'plan_id': 'P-26T98366HF1846442L7C5PWA' }); }, onApprove: function(data, actions) { //here <-------------------------------- success payment made! alert(data.subscriptionID); } }).render('#paypal-button-annual');
... View more