[w3c/payment-handler] HEAD request for supportedMethods not getting triggered (#286)

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