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) {
5555 orderData ?. purchase_units ?. [ 0 ] ?. payments ?. authorizations ?. [ 0 ] ;
5656 const errorDetail = orderData ?. details ?. [ 0 ] ;
5757
58- const isHostedFieldsComponent = typeof data . card === "object" ;
59-
6058 // 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 ) {
6560 // (1) Recoverable INSTRUMENT_DECLINED -> call actions.restart()
6661 // recoverable state, per https://developer.paypal.com/docs/checkout/standard/customize/handle-funding-failures/
6762 return actions . restart ( ) ;
You can’t perform that action at this time.
0 commit comments