TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jordan Trajkov
1.6k
163
10.5k
How to make reccurent payment with paypal
Sep 12 2019 1:26 PM
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) {
// Show an error page here, when an error occurs
alert(
'Here is error: '
+ err);
},
onCancel:
function
(data) {
// Show a cancel page, or return to cart
}
}).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?
Reply
Answers (
4
)
Convert aspx.cs code into .net core api?
Crystal Report Not Showing No bugs ?.