• Rouslan Solomakhin's avatar
    [Payment Handler] canMakePayment() is true for JIT install. · 8cf54bd6
    Rouslan Solomakhin authored
    Before this patch, if the only method of payment available was a payment
    handler that is not yet installed, but is available or installation
    Just-In-Time (JIT), then PaymentRequest.canMakePayment() would return
    "false". This prevented JIT installable payment handler usage by
    merchants that don't call PaymentRequest.show() unless
    PaymentRequest.canMakePayment() returns true.
    
    This patch makes canMakePayment() return "true" for JIT installable
    payment handlers on both desktop and Android. (iOS does not support
    payment handlers at this point.)
    
    After this patch, if the only method of payment available is a payment
    handler that is not yet installed, but is available for JIT
    installation, then PaymentRequest.canMakePayment() would return "true".
    
    Bug: 877644
    Change-Id: I614a02789b514d5d0e7738ca827178a844e74199
    Reviewed-on: https://chromium-review.googlesource.com/1188900
    Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
    Reviewed-by: default avatarGanggui Tang <gogerald@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#586252}
    8cf54bd6
service_worker_payment_instrument.cc 13.5 KB