Paypal Subscription Button Upgrade Membership - paypal

I created 2 Subscribe button with paypal. This buttons for different membership : 1. basic 2. pro.
I am trying to subscribe membership with thisbuttons and working without any problem.
But when I was trying to upgrade or downgrade via other buttons paypal create new membership. So If I use 2 buttons for membership I have 2 active membership: pro and basic on paypal. How can I prevent this?

Use "modify" variable in the subscription button, so that the existing subscription will get modify and there will be only one subscription. Click here for more information.

Related

How to receive webhooks from paypal donations? (and a few other misunderstandings)

Good day, everyone. I'm a bit stumped on this subject. I have a bit of experience with PayPal developer apps when it comes to subscriptions but this issue with donations is stumping me.
I would like to receive webhooks when a donation is made. I have created a new app in paypal developer dashboard, assigned it the webhook URL (a web app running on Python Flask) and while I have been able to successfully send and receive mock sandbox webhooks from the developer sandbox dashboard for testing so I know everything is configured to work. I just can't figure out how to now establish the live environment donations handling.
I have a business and a developer PayPal account. Within my business account (which I assume is the one that does live donation transactions), I have created a donation button. Logic would dictate that within this donation button setup, there should be a select option to specify the app who's webhooks these donations need to be using. But there is no such thing and PayPal's developer forum is deserted.
The general question is:
How does one set up a donation button to receive webhooks to a certain app or is that not how this works? Because I can have multiple donation buttons for various purposes, campaigns and configurations and I don't need webhooks for all of them. If I am forced to receive all donations, at least I see that there's a donation button ID which I can use to filter out donations coming from other buttons. But I can't even do that if I am not receiving donation webhooks at all.
Looks like for the time being to make this work I have to use Smart Buttons instead of donation buttons in Paypal. With smart buttons I can specify an app id I created in the developer dashboard and receive the webhooks this way.

WHMCS & PayPal - How to disable the create account from express checkout?

I am using PayPal with WHMCS. During the purchase, PayPal express checkout popup shows the create PayPal account form also below the credit card information form, and this [Create your PayPal account] form is required even after doing these changes as per the PayPal documentation.
On the other side, the WHMCS also doesn't have any option to disable/hide the create PayPal account form.
Due to this issue, my clients are getting annoyed and leaving my site without completing the purchase. How to disable the create account from express checkout?
That is the normal flow for new PayPal buyers. An option to pay without creating an account might sometimes be available, depending on many factors including the buyer's location, but is never guaranteed.
For the option of a black button to pay with a Debit or Credit Card to always be available, integrate with current PayPal Checkout buttons, which for a UAE buyer will look like this:
You can test the demo here and append &buyer-country=AE to the SDK script line (only for sandbox mode)
I know this is an old thread but incase anyone else is trying to solve it, I've just used simple CSS to hide it - using the default Twenty One theme I just added this to my custom.css file.
.express-checkout-buttons {
display:none;
}
And it hides. I know its not the best option but it works for me as I don't need to my clients checking out via this option.

Can I use Paypal for recursive payments or for subscriptions in Ionic 3?

I want to create monthly and weekly subscriptions in my ionic 3 application and I want to use Paypal for this purpose.
I can not find the proper way to integrate it. Can anyone help? I also want to check the subscription status of the user whenever he opens the application.
From best of my knowledge you cant do this with ionic. Since they just have single payment option available. You can't do this until unless you do some native coding write down custom code.
All you can do this is you can open a your website URL in InAppBrowser and from there user can purchase its subscription and once the subscription is successfully purchased you can close the InAppBrowser.
I have mentioned PayPal available plugin listed below.
https://ionicframework.com/docs/native/paypal

Creating paypal buttons on the fly

I have a webapp, where users sell printing services, I want to allow my users to add a pay now buttons to their pages so customers can pay for their services.
My users specify their paypal email address etc in the settings and set up their services with a price etc.
What API should I use to create the pay now buttons on the fly ?
Thanks
You don't need an API for creating "pay now" buttons. You can either create the button from within your customer's Paypal accounts or dynamically generate with HTML (see HTML Variables for Paypal Payments standard).
One advantage of creating the buttons from your/their Paypal account is that you can get an additional layer of security (support for encrypting the form or using a hosted button id so user cannot change the amount submitted to Paypal).
However, if you deal with hundreds of different buttons then it makes more sense to dynamically generate the buttons and just perform additional validation when Paypal sends back the confirmation (either through PDT or IPN) before shipping your items.
You could use PayPal's JavaScriptButtons API and create your buttons dynamically with:
paypal.button.create(business, data, config, parentNode)
There is an button manager API that let's you create secure buttons - here is more info: https://www.x.com/developers/paypal/products/button-manager
PayPal offers different buttons based on your requirement.
Follow these steps to generate PayPal button:
Login to your PayPal Account
Click on Tools --> All Tools
Click on PayPal buttons
Now you are given few button options --> Buy Now is one if them.
Follow those three steps and then copy the code at the end of 3 steps and paste it in the page where you want this button to appear.
You are good to take Payments!

PHP - PayPal Subscriptions

I am trying to figure out how to prevent users to subscribe more than once. I just completed a PHP application for premium membership using PayPal Subscriptions and IPN.
When users login to their account and if they are not yet premium members, they are present with the premium options they can select from a drop down list.
Once they subscribe, this form is hidden while their subscription is active. When the subscription expires, the form is shown again.
THE PROBLEM: The PayPal IPN notification is not instant and sometimes takes several minutes after successful subscription and before the first notice arrives. So the signup form is exposed during this time. Users may think their subscription did not work and may try to subscribe again. Without receiving the notice from PayPal, I have no way of knowing if the form should be hidden or not.
THE QUETION: What solution would you recommend to get around this problem?
Create subscription in your DB before you redirect user to paypal. Create special flag like active : 0. After you create inactive subscription pass to PP order_id parameter.
When you receive IPN just change subscription status active : 1
Thus you will not show subscription offer to users who is in progress but you will show another page like
Your subscription is in progress. please refresh this page in few minuts. If you still cannot get access, please contact admin.