Hi,
i am integrating paypal smart buttons to my web application and so far i have same issue with both sandbox and live. While paypal button itself works fine and i can process payment without any issues other option "Debit or Credit Card" is not working for me.
When i click on "Debit or Credit Card" and populate that form, after submit i am getting next error:
{
"errors":[
{
"message":"HOSTED_FIELD_NOT_ALLOWED",
"path":[
"approveGuestPaymentWithCreditCard"
],
"stack":"Error: HOSTED_FIELD_NOT_ALLOWED\n at /dependencies/xobuyernodeserv/cronus/scripts/dist/src/graphql/types/Mutation/Mutation.js:895:25\n at Generator.next (<anonymous>)\n at step (/dependencies/xobuyernodeserv/cronus/scripts/dist/graphql/types/Mutation/Mutation.js:108:191)\n at /dependencies/xobuyernodeserv/cronus/scripts/dist/graphql/types/Mutation/Mutation.js:108:361\n at propagateAslWrapper (/dependencies/xobuyernodeserv/cronus/scripts/node_modules/async-listener/index.js:504:23)\n at /dependencies/xobuyernodeserv/cronus/scripts/node_modules/async-listener/glue.js:188:31\n at /dependencies/xobuyernodeserv/cronus/scripts/node_modules/async-listener/index.js:541:70\n at /dependencies/xobuyernodeserv/cronus/scripts/node_modules/async-listener/glue.js:188:31\n at process._tickCallback (internal/process/next_tick.js:68:7)",
"checkpoints":[
],
"meta":{
},
"contingency":true,
"statusCode":200
}
],
"data":{
"approveGuestPaymentWithCreditCard":null
},
"extensions":{
"correlationId":"44e8402884f3f"
}
}
Here is my code:
paypal.Buttons({
// Set up the transaction
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: self.subscriptionAmount
}
}],
application_context: {
shipping_preference: 'NO_SHIPPING'
}
});
},
// Finalize the transaction
onApprove: function(data, actions) {
return actions.order.capture().then(details => {
}, error => {
});
});
},
onError: function (err) {
}
}).render(this.paypalElement.nativeElement);
So identical code is working fine with PayPal button but not with "Debit or Credit Card".
Neven
I'm facing the same issue. Please assist
i have the same problem
I have the same problem
I've exactly the same problem
Reply from support:
I have reviewed your account and it shows that not all countries can pay without registration, those customers who can pay without registration will see option to pay with a credit card directly.
This is still a bug in js sdk, because its rendering option that is not going to work for all customers.
I have the same problem, this is critical.
I found a behavior that generates this error, may be a coincidence but I think everyone can test and verify if the problem has been resolved.
I was using a test card I found on the internet and this error always pops up.
When I started using the cards generated in the paypal dasgboard (https://developer.paypal.com/developer/creditCardGenerator/), the error is no longer happening.
I have the same finding as @thyagomuris did. You can't use common testing CC like 4111111111111111 or 4242424242424242. You have to use one that is linked to your sandbox buyer account: https://developer.paypal.com/developer/accounts/. Go view your sandbox account detail and the funding tab should have the CC numbers.
Same problem, any update on this?
It looks to me that this issue is only affecting specific markets/countries and probably PP does not really care about those markets to actually fix the issue.
i'm having this too now, omg nobody found a solution until today?
Hi @khanghoang -- are you familiar with this one?
@nevenblazic -- are you still seeing this issue?
Folks, we've made a couple of changes from our side. Please let us know if the problem still occurs.
The majority of the HOSTED_FIELD_NOT_ALLOWED is because PayPal cannot process the guest transaction in the buyer's billing country.
I can check in next 2-3 days, will let you know.
Folks, I will close the issue for now. Feel free to reopen it if it occurs again.
I still have the same problem, if i chosen the Russia
@polar-webspark for RU, you need to load the sdk with locale param set to xx_RU
For example:
```
<!-- Include the PayPal JavaScript SDK -->
<script src="https://www.paypal.com/sdk/js?client-id=sb¤cy=USD&locale=en_RU"></script>
<script>
// Render the PayPal button into #paypal-button-container
paypal.Buttons({
style: {
color: 'blue',
shape: 'pill',
label: 'pay',
height: 40
}
}).render('#paypal-button-container');
</script>
```
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I have the same finding as @thyagomuris did. You can't use common testing CC like 4111111111111111 or 4242424242424242. You have to use one that is linked to your sandbox buyer account: https://developer.paypal.com/developer/accounts/. Go view your sandbox account detail and the funding tab should have the CC numbers.