button code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi .... I may be over complicating things here ... if i follow supposedly the simple process of creating a buy now button ... what tells me the payment will go to my merchant account... see code generated here (thank you in advance):
<div id="paypal-button-container"></div>
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD" data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
style: {
shape: 'rect',
color: 'gold',
layout: 'vertical',
label: 'buynow',
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '67.00'
}
}]
});
},
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
}
}).render('#paypal-button-container');
</script>
- Labels:
-
PayPal Buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you output the details to the console, you can see the result of the transaction in your javascript console.
in the area where you have the alert, add the console.log(details) line after it.
alert('Transaction completed by ' + details.payer.name.given_name + '!');
console.log(details);
you can also display it on the page using
JSON.stringify(details, undefined, 4));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please put this solution into english.
I am a dinosaur. The last PayPal button I created was over 10 years ago. It still works but has a validation code that is well over a thousand characters long. I'd just procure that much smaller, more efficient button, but it charges customers sales tax on a non taxable item.
So I generated a new button from PayPal. Its actually a pretty ugly, three button set up. I don't want to give credit on a small purchase. Its all generic code, nothing to validate my account. And it doesn't work. It doesn't do anything.
I was able to generate two API codes, one of them is "secret. I have no idea which code to use and most importantly: Where do I insert my validation code?
I don't even know what the correct term is to ask the question. Every option I click on takes me into branded more complex options that require sign up, have my technical team contact their instructions, well I have no idea what they are talking about.
All I want is a simple button on my html web page so people can pay me if they want to use my service.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Hi paypal i want to add a donation button from Pakistan in Merchant Products and Services Archives
- I need to change the tax rate in my Paypal buttons, where is this found? in Merchant Products and Services Archives
- test paypal button in Merchant Products and Services Archives
- How do I get a Donation Code in Merchant Products and Services Archives
- Has PayPal removed the ability to update shipping charges on PayPal Buttons? in Business Tools Archives