cocoastorm / vue-paypal-checkout

A simple Vue.js wrapper component for paypal-checkout
MIT License
153 stars 67 forks source link

Can we add the 'authorize' support instead of only 'sale'? #73

Open jonathanw2004 opened 5 years ago

jonathanw2004 commented 5 years ago

Basically, I would like the UI to get the customers' authorization only and capture the payment in my backend code. This allows my customers to be able to cancel the payment in a period (3 days from PayPal) without any PayPal transaction fee on me. Thanks.

jonathanw2004 commented 5 years ago

The fix could be just adding one line in the below code:

  var payment = {
     intent: this.commit ? 'sale' : 'authorize', <=== adding this line seems fix the issue.
     transactions: [transaction]
  };
vincenzourbisaglia commented 5 years ago

Any update on that?

Kabyno commented 5 years ago

I’m interested by this feature too.

theissn commented 4 years ago

In case you're still waiting for this feature, I managed to accomplish this by adding the following prop on the component: :commit="false"

<PayPal
  amount="10.00"
  currency="GBP"
  env="sandbox" 
  invoice-number="WEB-123"
  :client="credentials"
  :commit="false"
/>

Which will then only authorize the payment and fire the below event:

image