This is not possible to do as the actions are locked off. I'm using typescript.
//in react element
onShippingChange={(data:OnShippingChangeData)=>{
actions.reject() //not available
throw new Error() //not caught and forcing a rejection
return null //not handled as a failure
}}`
Trying to force a payment rejection in onShippingChange. The goal is to reject purchases outside of a certain address like the use case here: https://developer.paypal.com/docs/checkout/integration-features/shipping-callback/.
This is not possible to do as the actions are locked off. I'm using typescript.