File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
advanced-integration/public Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,8 @@ async function onApproveCallback(data, actions) {
55
55
orderData ?. purchase_units ?. [ 0 ] ?. payments ?. authorizations ?. [ 0 ] ;
56
56
const errorDetail = orderData ?. details ?. [ 0 ] ;
57
57
58
- const isHostedFieldsComponent = typeof data . card === "object" ;
59
-
60
58
// this actions.restart() behavior only applies to the Buttons component
61
- if (
62
- errorDetail ?. issue === "INSTRUMENT_DECLINED" &&
63
- isHostedFieldsComponent === false
64
- ) {
59
+ if ( errorDetail ?. issue === "INSTRUMENT_DECLINED" && ! data . card && actions ) {
65
60
// (1) Recoverable INSTRUMENT_DECLINED -> call actions.restart()
66
61
// recoverable state, per https://developer.paypal.com/docs/checkout/standard/customize/handle-funding-failures/
67
62
return actions . restart ( ) ;
You can’t perform that action at this time.
0 commit comments