ppxo_inline_guest_unhandled_error
- Marquer comme nouveau
- Ajouter en favori
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
En prod, mon code fonctionne parfaitement.
Mais en Sandbox, j'ai l'erreur ppxo_inline_guest_unhandled_error dans la console.
J'ai ça plus précisément :
createStore.js:100 POST https://www.sandbox.paypal.com/graphql?fetch_credit_form_submit 500
ppxo_inline_guest_unhandled_error {
handledErrors: Array(0), unhandledErrors: Array(0),
inline_guest_version: '2.20.4',
timestamp: 1695305625089,
windowID: 'cf4dde580c', …}
country: "FR"
env: "sandbox"
handledErrors: []
host: "www.sandbox.paypal.com"
inline_guest_version: "2.20.4"
lang: "fr"
pageID: "b18984a7e6"
path: "/smart/card-fields"
referer: "www.sandbox.paypal.com"
timestamp: 1695305625089
uid: "uid_3970edc878_mtq6mdk6mzu"
unhandledErrors: []
ver: "2.20.4"
...
J'ai testé les cartes proposées ici https://developer.paypal.com/api/rest/sandbox/card-testing/#link-creditcardgeneratorfortesting
Ainsi qu'avec le générateur de CB
Ca plante dans la console, sans envoyer d'erreur sur la page. Et ça ne devrait tout simplement pas planter...
Mon code :
<script>
showSpinner();
const payForm = document.querySelector('#pay-form');
const facilitatorAccessTokenInput = document.querySelector('#facilitatorAccessToken');
const orderIDInput = document.querySelector('#orderID');
const payerIDInput = document.querySelector('#payerID');
{# Il ne faut pas utiliser invoice.prenom mais directement prenom car il y a un traitement sur les caracteres #}
paypal.Buttons({
style: {
shape: 'pill',
},
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
currency_code: "EUR",
value: "{{ price }}",
},
invoice_id: "{{ invoice.ppInvoiceId }}",
custom_id: "{{ invoice.ppCustomId }}",
}],
{# application_context: {
shipping_preference: "SET_PROVIDED_ADDRESS",
}, #}
payer: {
email_address: "{{ email }}",
name: {
given_name: "{{ firstname }}",
surname: "{{ lastname }}",
},
{# phone: {
phone_number: "{{ phone }}"
}, #}
address: {
address_line_1: "{{ streetAddress1 }}",
address_line_2: "{{ streetAddress2 }}",
postal_code: "{{ postalCode }}",
country_code: "{{ countryCode | upper}}",
admin_area_2: "{{ city | upper}}",
}
}
});
},
onApprove: function(data, actions) {
console.log('ICE ::: onApprove ::: data: ', data)
showSpinner();
const { facilitatorAccessToken, orderID, payerID } = data
facilitatorAccessTokenInput.value = facilitatorAccessToken
orderIDInput.value = orderID
payerIDInput.value = payerID
payForm.submit();
},
onCancel: function (data) {
console.log('ICE ::: onCancel ::: data: ', data)
hideSpinner();
},
onError: function (err) {
console.log('ICE ::: onError ::: data: ', err)
hideSpinner();
alert("Une erreur s’est produite durant le traitement de votre commande. La procédure de paiement a été annulée. Votre compte n’a pas été débité. N’hésitez pas à vérifier votre connexion et à réessayer dans quelques minutes. [Code CPPP-01] ")
},
onClick: function() {
console.log('ICE ::: onClick')
},
onInit: function(data, actions) {
console.log('ICE ::: onInit ::: data: ', data)
hideSpinner();
}
}).render('#paypal-button-container');
</script>
- Marquer comme nouveau
- Ajouter en favori
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Today, without having made any changes to my code, the script works correctly again.
I think it's an instability of the Paypal dev/sandbox platform.
In addition to costing me a day late, it will have cost me a day of freelance work for nothing, which is not negligible for a small company like mine.
And it's really very annoying, especially since the services page indicated that all services were working.
And it also shows that the proposed code is not reliable in any case either, since it is not capable of handling errors without crashing.
Right now, I'm stuck with PP. I'm going to have a hard time not looking at the competition for my next projects.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.