Digital goods manual actions
silva96
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Mar-19-2021
08:21 AM
Hi, I'm trying to sell digital goods with the Smart Payment Buttons, the payments work perfect but I think it's not working as digital goods.
I have the following code
setPaypal () {
const $this = this
// eslint-disable-next-line no-undef
paypal.Buttons({
createOrder: function (data, actions) {
return actions.order.create({
payer: {
name: {
given_name: $this.firstName,
surname: $this.lastName
},
email_address: $this.emailAddress
},
purchase_units: [{
amount: {
value: $this.priceUsd,
currency_code: 'USD',
breakdown: {
item_total: {
value: $this.priceUsd,
currency_code: 'USD'
}
}
},
items: [
{
name: `x ${$this.quantity} ProfeCoins`,
category: 'DIGITAL_GOODS',
quantity: '1',
unit_amount: {
value: $this.priceUsd,
currency_code: 'USD'
}
}
]
}],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
})
},
onApprove: function (data, actions) {
$this.element.classList.add('is-hidden')
document.querySelector('#loading-wrapper').classList.remove('is-hidden')
return actions.order.capture().then(function (details) {
// eslint-disable-next-line no-undef
Turbolinks.visit(`/payments/success?trx_id=${details.id}&quantity=${$this.quantity}`)
})
}
}).render('#paypal-button-container')
// This function displays Smart Payment Buttons on your web page.
}
The relevant parts of the code are:
shipping_preference: 'NO_SHIPPING'
category: 'DIGITAL_GOODS',
Even though, when I click on this black button:
It asks me for postal code, what for? I'm not sending anything, these are digital goods.
Then when someone pays I get an email I have to do manual things to get my funds.
then
then
I don't want to do this for every order, can't this be automatic?
0 REPLIES 0

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Simple Paypal button integration results in 404 error in Sandbox Environment
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- Buttons for services, not goods? category option in item in PayPal Payments Standard
- POST/V2/checkout/orders failed transaction in REST APIs
- How do I use multiple paypal smart buttons on the same site without repeating the code? in PayPal Payments Standard