HOSTED_FIELD_NOT_ALLOWED
See original GitHub issueHi, 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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:18 (4 by maintainers)
Top Results From Across the Web
hosted-fields/shared/errors.js - Documentation
Hosted Fields - Creation Error Codes * @description Errors that occur when ... Occurs when the type of value for an attribute is...
Read more >Hosted fields throws an error when passing container in React ...
I've got a fix started that drops the container field before sending it to the hosted fields iframes. Will update here when it's...
Read more >Hosted Fields - Braintree Developer ... - PayPal Developer
When any state has changed within an input including: validation, focus, card type detection, etc. isEmpty, Boolean, Whether or not the user has...
Read more >Uncaught error in Braintree hosted fields solution
Why does my JavaScript code receive a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error, while Postman does ...
Read more >Hosted-fields - Getting started - Dalenys
Hosted-fields integration, best compromise between security, ... 'This is a sandbox environment payment form: no actual bank movements will occur.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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.