Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Stripe決済対応 バリカートの紹介と本カートシステムでの Stripe連携の仕組み
Search
Takashi Nojima
March 23, 2020
Technology
0
140
Stripe決済対応 バリカートの紹介と本カートシステムでの Stripe連携の仕組み
JP_Stripes 福岡 vol.6
2020/03
バリカート
https://baricart.jp
Takashi Nojima
March 23, 2020
Tweet
Share
More Decks by Takashi Nojima
See All by Takashi Nojima
CakePHP3で時間を 扱いたかったお話 / Fukuoka.php 201904
nojimage
0
340
Dockerで作るPHP開発環境(入門編)
nojimage
3
960
CakePHP3 Modelless Form
nojimage
3
2.7k
Codeceptionでテストをしよう
nojimage
0
1.6k
Other Decks in Technology
See All in Technology
Amazon Route 53, 待ちに待った TLSAレコードのサポート開始
kenichinakamura
0
210
Plants vs thieves: Automated Tests in the World of Web Security
leichteckig
0
140
re:Invent Recap (January 2025)
scalefactory
0
320
ObservabilityCON on the Road Tokyoの見どころ
hamadakoji
0
110
やっちゃえ誤自宅Nutanix
yukiafronia
0
320
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
5
1.3k
ココナラのセキュリティ組織の体制・役割・今後目指す世界
coconala_engineer
0
170
DMMブックスへのTipKit導入
ttyi2
1
150
AIアプリケーション開発でAzure AI Searchを使いこなすためには
isidaitc
1
250
Microsoft Ignite 2024 最新情報!Microsoft 365 Agents SDK 概要 / Microsoft Ignite 2024 latest news Microsoft 365 Agents SDK overview
karamem0
0
160
Japan AWS Jr. Championsがお届けするre:Invent2024のハイライト ~ラスベガスで見てきた景色~
fukuchiiinu
0
1.1k
生成AIを活用した機能を、顧客に提供するまでに乗り越えた『4つの壁』
toshiblues
1
170
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Agile that works and the tools we love
rasmusluckow
328
21k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
Optimising Largest Contentful Paint
csswizardry
33
3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Why Our Code Smells
bkeepers
PRO
335
57k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Making the Leap to Tech Lead
cromwellryan
133
9k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
Adopting Sorbet at Scale
ufuk
74
9.2k
Transcript
4USJQFܾࡁରԠόϦΧʔτͷհͱ ຊΧʔτγεςϜͰͷ 4USJQF࿈ܞͷΈ +1@4USJQFTԬWPM
About Me ໊લɿౡོʢͷ͡·͔ͨ͠ʣ ॴଐɿΠϥεςΟοΫίϯαϧλϯπגࣜձࣾ IUUQTFMBTUJDDPOTVMUBOUTDPN ‣ (JUIVC5XJUUFSOPKJNBHF
͢͜ͱ ‣ όϦΧʔτͷ͝հ ‣ όϦΧʔτΛ4USJQFܾࡁʹରԠ͢ΔͨΊʹ ͬͨ͜ͱ
None
όϦΧʔτ is Headless ‣ ϑϩϯτΤϯυͷ(6*Λ࣋ͨͳ͍ ‣ ඞཁͳσʔλɺૢ࡞"1*ܦ༝ͰΓऔΓ͢Δ ‣ ϑϩϯτΤϯυͱόοΫΤϯυΛͯ͠ઃஔͰ͖ Δ
‣ ͦͷͨΊϑϩϯτΤϯυͷࣗ༝͕ߴ͍
'SPOU&OE #BDL&OE ΧʔτγεςϜ ͜Ε·ͰͷΧʔτγεςϜ όϦΧʔτ 'SPOU&OE #BDL&OE όϦΧʔτ
'SPOU&OE #BDL&OE όϦΧʔτ ҰͭͷόϦΧʔτͰෳγϣοϓ։ઃՄೳ 'SPOU&OE 'SPOU&OE
ࣄྫհ
νϣΠεδϟύϯגࣜձ༷ࣾ IUUQTIBQQZGBNJMZMJGFKQ IUUQTTJMJDBTJMJDBDPN IUUQTKVLFOPIDPN IUUQTTQBSLMJOHTJMJDBTJMJDBDPN
νϣΠεδϟύϯגࣜձ༷ࣾ ‣ ૯߹γϣοϓαΠτͱɺࡐผʹϥϯσΟϯάϖʔ δʢ-1ʣαΠτΛ࡞ ‣ -1αΠτͰΛߪೖՄೳ
όϦΧʔτ ‣ ఆظߪೖ ‣ ϙΠϯτ༩ ‣ ϨϯλϧΧʔτ ‣ 4USJQFɺ1":+1ɺ"NB[PO1BZɺ/1ޙ͍ɺ ۜߦৼࠐɺҾ͖ɺ"MJQBZ
4USJQF ‣ ૹࣄۀऀ͚σʔλॻ͖ग़͠ ‣ εςοϓϝʔϧ ‣ ෳళฮରԠ
όϦΧʔτ ‣ "41αʔϏεͱͯ͠ఏڙ ‣ ΦϯϓϨϛε൛
https://baricart.jp
όϦΧʔτΛ 4USJQFܾࡁʹରԠͨ͠
$"6$"5*0/ લʹ࣮͍ͯ͠ΔͷͰ 4USJQF͕ࣾਪ͢Δ࠷৽ͷΈࠐΈํ๏ͱ ҟͳΓ·͢
ߏ γϣοϓαΠτ ߪೖϑΥʔϜ ΧʔτγεςϜ 4USJQF DIFDLPVUKT 4USJQF"1* ΧʔυೖྗϑΥʔϜΛදࣔͯ͠ ΧʔυτʔΫϯΛऔಘ
จΛ֬ఆ ΧʔυτʔΫϯΛ͢ $IBSHF
͍ͬͯΔStripeͷػೳ ‣ IUUQTDIFDLPVUTUSJQFDPNDIFDLPVUKT ‣ ΧʔυใͷೖྗɺΧʔυτʔΫϯͷऔಘ ‣ 4USJQF"1* 1)1 ‣
$IBSHFɺ$VTUPNFSɺ3FGVOE
࡞ͬͨͷ ‣ ϑϩϯτΤϯυ༻DIFDLPVUKTͷಡΈࠐΈ+4 ‣ จঢ়ଶมߋ࣌ͷ4USJQF"1*ίʔϧ ‣ จ֬ఆ࣌ ‣ จΩϟϯηϧ࣌
checkout.jsͷಡΈࠐΈJS ‣ DIFDLPVUKTΛར༻͢Δʹ4USJQF"1*Ωʔͷࢦఆ ͕ඞཁ ‣ "1*ΩʔจॲཧͰར༻͢ΔͷͰΧʔτγεςϜ ʹొ͍ͯ͠Δ͕ɺϑϩϯτΤϯυͱόοΫΤϯυ ͕͍ͯ͠ΔͷͰɺϑϩϯτΤϯυଆʹ"1* ΩʔΛॻ͔ͳ͚ΕͳΒͳ͔ͬͨˠෆศ ϑϩϯτΤϯυͱόοΫΤϯυ͕͍ͯ͠ΔނͷΈ
checkout.jsͷಡΈࠐΈJS ‣ ΧʔτγεςϜΑΓ"1*ΩʔΛऔಘ͔ͯ͠Βɺ DIFDLPVUKTΛಡΈࠐΜͰจϑΥʔϜຒΊࠐΈ ΧʔυใͷೖྗϘλϯΛදࣔͤ͞Δ ‣ Χʔυใ͕ೖྗ͞ΕͨΒΧʔυτʔΫϯ͕औಘͰ ͖ΔͷͰɺͦΕΛจσʔλʹՃ͢Δ ‣ ͱ͍͏ॲཧΛจϑΥʔϜͷ)5.-ߦՃ͢Δ
͚ͩͰߦ͑ΔεΫϦϓτΛ࡞ͬͨ
จঢ়ଶมߋ࣌ͷAPIίʔϧ ‣ ΧʔτγεςϜ͕ࢧ͍ॲཧ༻ͷΠϯλʔϑΣʔε Λ͍࣋ͬͯΔͷͰͦΕʹ߹Θ࣮ͤͯ ‣ จ֬ఆ࣌ ‣ a4USJQFa$VTUPNFSaDSFBUF ɾɾɾސ٬ͷ࣍ճҎ߱ͷจͰʮొࡁ ΧʔυͰࢧ͏ʯΛ࣮ݱ͢ΔͨΊʹΧʔυτʔΫϯͷΈΛొ
‣ a4USJQFa$IBSHFaDSFBUF DBQUVSF
จঢ়ଶมߋ࣌ͷAPIίʔϧ ‣ จΩϟϯηϧ࣌ ‣ a4USJQFa3FGVOEaDSFBUF
࣮ͷϙΠϯτ ‣ ࢧ͍Λ֬ఆ͢ΔͱֹۚͷมߋͰ͖ͳ͍ ‣ ֹۚมߋΛ͏จฤूɺ จΩϟϯηϧˠ৽نจʹஔ͖͑ ͱߟ͑ͨ΄͏ָ͕
࣮ͷϙΠϯτ ‣ 4USJQF"1*ͷϦΫΤετ༰ɺϨεϙϯε༰ ه͓ͯ͘͠ ‣ 4USJQF"1*ͷϦΫΤετ͕ࣦഊͨ͠Βจঢ়ଶભ ҠΛΩϟϯηϧ͢Δ ‣ 4USJQF"1*͔ΒͷΤϥʔཧ༝มͯ͠දࣔ͢Δ
࣮ͷϙΠϯτ ‣ ༻ҙ͞Ε͍ͯΔػೳ͔Βඞཁͳͷ͚ͩΛར༻͢Δ
$"6$"5*0/ લʹ࣮͍ͯ͠ΔͷͰ 4USJQF͕ࣾਪ͢Δ࠷৽ͷΈࠐΈํ๏ͱ ҟͳΓ·͢
StripeରԠ TODO ‣ ࠓճͷൃදʹ͋ͨͬͯɺ4USJQFΛௐͯͨ͠Β ৭ʑΞοϓσʔτ͞Ε͍ͯΔ ‣ DIFDLPVUKTˠ4USJQF&MFNFOUT ‣ ݱࡏͷߪೖϑϩʔʢ֬ೝը໘ͷલʹΧʔυೖྗʣ͔Βɺจ֬ఆޙʹ ΧʔυೖྗΛߦ͏ϑϩʔʹมߋ͢Δඞཁ͕͋Δ
‣ 4USJQF1)1-JCYˠY ‣ IUUQTHJUIVCDPNTUSJQFTUSJQFQIQXJLJ.JHSBUJPOHVJEFGPSW
Stripe Elements? ‣ "QQMF1BZ(PPHMF1BZͳͲΧʔυҎ֎ͷܾࡁํ ๏ʹରԠՄೳ ‣ $IBSHFT"1*ͷΘΓʹ1BZNFOU*OUFOUT"1*Λ ར༻͢Δ ‣ ࠓͷͱ͜Ζ$IBSHFT"1*ͷഇࢭ༧ఆͳ͍
Stripe Elements? ‣ จֹ͕ۚ֬ఆͨ͠ޙʹɺαʔόʔ্Ͱ1BZNFOU *OUFOUΛ࡞͔ͯ͠ΒɺϑϩϯτΤϯυ͢ ‣ ސ٬4USJQF&MFNFOUTͰ࡞͞ΕΔϑΥʔϜ ΧʔυใΛೖྗܾͯ͠ࡁ͢Δ ‣ 4USJQFܾࡁ͕ྃͨ͠ޙͷॲཧΛ+BWB4DSJQUͰهड़
Ͱ͖ΔͷͰɺจͷޙॲཧจྃը໘ͷભҠ ͳͲΛߦ͏
࣭ʁ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠