- Joined
- Jul 2, 2020
- Messages
- 4
- Points
- 1
So, first of all, I have a paypal account. I logged into paypal and I asked them to give me the code for a button.
The problem is that after I copied the generated code into my clip board and then pasted it into my text editor, what I got was a whole lot of nothing. It has some <div> tags and some <script> tags but there is absolutely nothing that tells me that the code there points to my account or anything.
There must be a whole lot of page data I am missing.
Is there anyone who can suggest what I should do?
When I put this into an html page, the browser just ignores everything.
It is as if it is a generic thing and not specified to me.
The problem is that after I copied the generated code into my clip board and then pasted it into my text editor, what I got was a whole lot of nothing. It has some <div> tags and some <script> tags but there is absolutely nothing that tells me that the code there points to my account or anything.
There must be a whole lot of page data I am missing.
Is there anyone who can suggest what I should do?
When I put this into an html page, the browser just ignores everything.
It is as if it is a generic thing and not specified to me.
HTML:
<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: 'pill',
color: 'gold',
layout: 'vertical',
label: 'pay',
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '1'
}
}]
});
},
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>