Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ApplePay対応サービスを最速で作る

 ApplePay対応サービスを最速で作る

http://eventregist.com/e/JPStripes_Tokyo6 の発表スライドです。

Mamoru Amano

March 13, 2018
Tweet

More Decks by Mamoru Amano

Other Decks in Programming

Transcript

  1. 1BZNFOU3FRVFTU#VUUPO var stripe = Stripe(gon.stripe_public_key); var paymentRequest = stripe.paymentRequest({ country:

    'JP', currency: 'jpy', total: { label: ‘JOYMO ͝ར༻ྉۚ’, amount: 300 } }); var elements = stripe.elements(); var prButton = elements.create('paymentRequestButton', { paymentRequest: paymentRequest, }); paymentRequest.canMakePayment().then(function(result) { if (result) { prButton.mount('#payment-request-button'); } else { document.querySelector(‘.payment-request-button-wrapper') .innerText = ‘͝ར༻ͷ୺຤Ͱ͸Apple PayΛ͝ར༻͍ͨͩ͘͜ͱ͸ग़དྷ·ͤΜɻ'; } }); a͜ΕͰग़Δʂ