Skip to content

Paypal shipment error for digial products #524

Discussion options

You must be logged in to vote

@mohitkumar29 you can configure the PayPal button this way:

const requireShipping = Boolean(cart.shipment_delivery);

swell.payment.createElements({
  paypal: {
    elementId: 'paypal-button',
    require: {
      shipping: requireShipping, // default: true
    },
    onSuccess: () => {
      // called on paypal payment success
      submitOrder();
    },
    onError: error => {
      // called on paypal payment error
      console.error(error);
      errorHandler(error);
    }
  }
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by logeshswell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
2 participants