alexislepresle/gatsby-plugin-paypal

Unable to override "createOrder" function with "createSubscription"

MrAlekhin opened this issue · 0 comments

...props,

Right now shows an error when I am trying to use createSubscription because we can use it together with createOrder. I think should be like that:

window.paypal
        .Buttons({
          createOrder: (props.createOrder ? props.createOrder : createOrderPaypal),
          onApprove: (props.onApprove ? props.onApprove : onApprovePaypal),
          onError: (props.onError ? props.onError : onErrorPaypal),
          ...props,
        })
        .render('#paypal-button');