Paypal-checkout-components: Provide granular errors from actions.payment.execute()

Created on 22 Sep 2017  路  15Comments  路  Source: paypal/paypal-checkout-components

Most helpful comment

I can't stress enough how important this feature is even for semi-serious integration - be able to catch errors during payment execution and save that info for both: receiver and payer to know what was the root cause of error (insufficient funds or whatever).

All 15 comments

I can't stress enough how important this feature is even for semi-serious integration - be able to catch errors during payment execution and save that info for both: receiver and payer to know what was the root cause of error (insufficient funds or whatever).

Is this still a thing? How am I supposed to pass the error from my payment endpoint back to checkout.js to provide a custom error message?

Yes unfortunately it is still exist.

The easiest way to reproduce the problem is to execute a payment with Duplicate invoice_number that was already used for a previous payment.

Interesting how paypal devs dont prioritize such an important issue, this affects both paypal customer support and our support greatly as many cases will be opened without either the merchant or the customer knowing the failure reason...

Can we get an update on this? I have to agree with the community that this is a crucial missing feature, considering how sensitive ecommerce sites are to customer drop-off in checkout.

I think I'm having the same issue...

I'm trying to use:

paypal.Button.render({
  payment: function (data, actions) { ... },
  onAuthorize: function (data, actions) { ... },
  onCancel: function (data, actions) { ... },
  onError: function (error) {
    console.log('onError():', error)
  }
}, '#paypal-button')

If I deliberately cause an error by submitting the wrong value for payment.transactions[].amount.currency in actions.payment.create() I see this:

paypal-error

I can't access the { name, details, message, information_link, debug_id } object, so I can't log or report the error.

Is this the same issue everyone else is having..?

I guess we're all stuck showing those annoying generic "An error happened!" messages to users until onError() gives us something useful.

@bluepnume Any updates on this..?

@stephen-last yes this is the error (well dont have to be the exact error, but it's validation condition raises this error).

The problem is that I have left the paypal project I was working on, but came across similar issue on this component: https://github.com/axios/axios/issues/960

When I was trying to console.log(error) it wasn't showing me the correct info just like in Paypal validation case, fixing it was as simple as console.log(error.response). So I guess we would have to know the structure of this validation error that comes back and print the relevant data out of the object.

any updates on this issue?

@bluepnume or anyone, not meant to pressure or anything but can you please tell at least very rough ETA on this issue? Can we expect the solution by the end of this year?

so far paypal is a nogo
must be offshore singapore

:"(

I think I'm having the same issue...

I'm trying to use:

paypal.Button.render({
  payment: function (data, actions) { ... },
  onAuthorize: function (data, actions) { ... },
  onCancel: function (data, actions) { ... },
  onError: function (error) {
    console.log('onError():', error)
  }
}, '#paypal-button')

If I deliberately cause an error by submitting the wrong value for payment.transactions[].amount.currency in actions.payment.create() I see this:

paypal-error

I can't access the { name, details, message, information_link, debug_id } object, so I can't log or report the error.

Is this the same issue everyone else is having..?

I guess we're all stuck showing those annoying generic "An error happened!" messages to users until onError() gives us something useful.

@bluepnume Any updates on this..?

Same issue for me

Any ETA?

I doubt there's an ETA because PayPal doesn't feel this is broken (lol)... because WHY would anyone ever want to see specific errors? AMIRITE???

This lack is just... shocking.

Thank you all for reaching out for this issue. We are currently working on figuring out which errors we can actually expose back to the client.
meanwhile, pls free to do server-side integrations that would give direct access to the errors. https://developer.paypal.com/demo/checkout/#/pattern/server

Closed -- this should now be working for actions.order.capture() call.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mtshare picture mtshare  路  5Comments

i7eo picture i7eo  路  3Comments

MrMooky picture MrMooky  路  3Comments

JDevjs picture JDevjs  路  6Comments

PhilibertDugas picture PhilibertDugas  路  5Comments