Hello, ok i take a look to this article: https://developer.paypal.com/docs/subscriptions/
As i see paypal provide ready made SDK .NET Project which i download and i run it. Here they provide a option to create Billing Plan with product which is used for subscription as i understand. With this function i create a product plan and recive this id: P-1FM52925BU386645MF32EE4A
Then i create new simple html page and add standard subscribe button with this code:
- <script src="https://www.paypal.com/sdk/js?client-id=[sandbox-client-id]&vault=true">
- </script>
-
- <div id="paypal-button-container"></div>
-
- <script>
- paypal.Buttons({
-
- createSubscription: function (data, actions) {
-
- return actions.subscription.create({
-
- 'plan_id': 'P-1FM52925BU386645MF32EE4A'
-
- });
-
- },
-
-
- onApprove: function (data, actions) {
-
- alert('You have successfully created subscription ' + data.subscriptionID);
-
- },
-
- onError: function (err) {
-
- alert('Here is error: '+ err);
- },
-
- onCancel: function (data) {
-
- }
-
-
- }).render('#paypal-button-container');
-
- </script>
Then i can see the subscribe button and if i click i recive an error like in the image below:
It seems like he cannot find the plan, but if use SDK .NET project to get all plans i can see that the plan exist.
Also i take a look in my developer account in API calls section and i can see this:
There are some warning probably becasue of the error i see after clickin subscribe button but without any explanation. At this image we can see that the billing plan is created succesfully.
Can you please help me what is wrong?