- From: kishoretulsiani <notifications@github.com>
- Date: Wed, 11 Apr 2018 11:09:23 -0700
- To: w3c/payment-handler <payment-handler@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/payment-handler/issues/286@github.com>
here is my sample code, this is part of majaybabu thread that showed that it is working on local. but when we shifted to remote server we fail on the canMakePayment(), it is alway coming as false. `function buildPaymentRequest() { const supportedInstruments = [ { supportedMethods: 'https://abc-dev.test.com/pay3', data: { threeDS: true }, } ]; const options = {requestShipping: true}; const details = { total: { label: 'Donation', amount: { currency: 'USD', value: '55.00', }, }, displayItems: [{ label: 'Original donation amount', amount: { currency: 'USD', value: '65.00', }, }, { label: 'Friends and family discount', amount: { currency: 'USD', value: '-10.00', }, }], }; var request = new PaymentRequest(supportedInstruments, details, options); if (request.canMakePayment) { request.canMakePayment().then(result => { if (result) { console.log('Payment methods are available.') } else { console.log('Payment methods are not available, but users can still add') } }).catch(error => { console.log('Unable to determine.') }); } request.addEventListener('shippingaddresschange', function (evt) { evt.updateWith(new Promise(function (resolve) { updateDetails(details, request.shippingAddress, resolve); })); }); return request; }` Want to understand at what line i should expect the HEAD request getting triggered? because when we trigger "https://abc-dev.test.com/pay3" manually from client i am getting some logs on server, but this code is not triggering HEAD request at all. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/payment-handler/issues/286
Received on Wednesday, 11 April 2018 18:09:48 UTC