Name: payment-request-shim
Owner: GoogleChromeLabs
Description: A shim for the payment request API.
Created: 2016-11-30 19:05:36.0
Updated: 2018-04-30 19:47:22.0
Pushed: 2018-03-14 13:34:23.0
Homepage: null
Size: 54
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This shim is designed to mitigate the pains of keeping up to date with the living standard for the Payment Request API.
This is intended to be used via a CDN and NOT used directly.
The goal will be to keep your code working for at least 2 major Chrome releases.
For more details on the Payment Request API itself, please see this guide.
To make use of the shim, simply add this script tag to your page before making use of the Payment Request API.
<script src="https://storage.googleapis.com/prshim/v1/payment-shim.js">
canMakePayment()
polyfill to the PaymentRequest prototype on Microsoft Edge. The polyfill returns true if the logged in user has a card on file that is supported by the platform; otherwise, returns false.
Note that the cards on file are not mediated against the supported networks listed in the PaymentRequest methodData.Copyright 2016 Google, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the ?License?); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an ?AS IS? BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.