payment-request icon indicating copy to clipboard operation
payment-request copied to clipboard

Pre Authorization

Open chadcampbell opened this issue 7 years ago • 8 comments

Hello,

I reviewed the Payment Request API. In my personal opinion, the PaymentRequest object needs an additional function. The purpose of the function would be to pre-authorize a payment for a specific amount. In the real-world, this situation happens at gas stations. For example, you have to swipe your credit card before you pump your gas. The gas station will pre-authorize that you can make a $100 purchase for example. In the digital world, I have the opinion that this preauthorization story is relevant when you take into consideration smart contracts.

I personally think this API would return a promise and would look something like this:

let paymentRequest = new PaymentRequest(...);
paymentRequest.authorize()
  .then(function(res) {
     // Now call the show function
  })
  .catch(function(ex1) {
    // The amount could not be preauthorized.
  })
;

chadcampbell avatar Sep 27 '17 12:09 chadcampbell