JP_Stripes 福岡 Vol.4 - 新入社員がカード決済に取り組んだ話

423df103b7893250803b9c45cc371efc?s=47 shimomo
September 12, 2018

JP_Stripes 福岡 Vol.4 - 新入社員がカード決済に取り組んだ話

423df103b7893250803b9c45cc371efc?s=128

shimomo

September 12, 2018
Tweet

Transcript

  1. ৽ೖࣾһ͕Χʔυܾࡁʹ औΓ૊Μͩ࿩ JP_Stripes ෱Ԭ Vol.4

  2. ࣗݾ঺հ • ࢤໟɹ༐Ұɹʢ͠΋ɹΏ͏͍ͪʣ • גࣜձࣾίϜɾΞϯυɾίϜ • ৽ଔೖࣾɹ1೥໨ • Stripeྺɹ1͔݄

  3. ৽ೖࣾһͰ΋StripeΛ࢖͑͹ Χʔυܾࡁ͘Β͍؆୯ʹ Ͱ͖ͪΌ͏ͬͯ࿩

  4. ๻ͱStripeͷೃΕॳΊ

  5. 2018೥7݄๭೔

  6. ࣾ௕͕ൃͨ͠ݴ༿

  7. ΧʔυܾࡁʹରԠ͠Ζʂ

  8. ଞਓࣄ

  9. ͔͠͠

  10. গ਺ਫ਼Ӷ

  11. ͳΜ΍͔Μ΍͋ͬͯ ๻͕΍Δ͜ͱʹ

  12. ৽ೖࣾһʹ ܾࡁγεςϜΛߏஙͤ͞Δ ΠΧͨ͠ΠΧΕͨձࣾ

  13. ఏࣔ͞Εͨ։ൃ৚݅

  14. Stripe

  15. ͦΕ͚ͩ

  16. ͭ·Γ

  17. ࣗ༝

  18. ͔͠͠

  19. ෼͔Βͳ͍͜ͱ͕ ͍ͬͺ͍

  20. αʔϏεͷ ՝ۚϞσϧ͸ʁ

  21. StripeͬͯԿʁ

  22. ௐ΂ͨ

  23. ֹ݄՝ۚΒ͍͠

  24. ֹۚ = ୯Ձ × ར༻ऀ਺

  25. ͱΓ͋͑ͣStripeͰ ΍ͬͯΈΔ

  26. Subscription

  27. ݒ೦఺͕1ͭ

  28. ࣄલʹ՝ֹۚΛ ઃఆ͢Δ͜ͱ͸Ͱ͖ͳ͍

  29. Ͳ͏͢Δʁ

  30. ैྔ՝ۚʁ

  31. ͍΍

  32. Webhook

  33. Make adjustments to an invoice when it's created (but before

    it's been paid)
  34. ܾࡁલͷ੥ٻॻʹ ߲໨Λ௥Ճ͢Ε͹͑͑Μ΍

  35. ຖ݄0ԁͰܾࡁ͢Δ SubscriptionΛސ٬ຖʹઃఆ

  36. ຖ݄0ԁͷ੥ٻॻ͕࡞੒

  37. invoice.created ඈΜͰ͘Δ

  38. Invoice Created "{ "data": { "object": { "id": "in_00000000000000", //

    ੥ٻॻͷID "object": "invoice", "amount_due": 0, "amount_paid": 0, "amount_remaining": 0, "currency": "jpy", "customer": "cus_00000000000000", // ސ٬ͷID
  39. ੥ٻॻͷ߲໨Λ࡞੒ InvoiceItem <?php \Stripe\InvoiceItem::create([ 'amount' => ʢ୯Ձ × ར༻ऀ਺ʣ, 'invoice'

    => ‘in_00000000000000', // ੥ٻॻͷID 'customer' => ‘cus_00000000000000', // ސ٬ͷID 'currency' => 'jpy', 'description' => 'ֹ݄අ༻', ]);
  40. ΍ͬͨͥ

  41. ͱ͍͏͜ͱͰ

  42. WebhookΛ࢖͑͹ ԿͰ΋Ͱ͖Δؾ͕ͯ͘͠Δ

  43. ΋ͬͱྑ͍ํ๏͋ͬͨΒ ڭ͍͑ͯͩ͘͞

  44. ৽ೖࣾһͰ΋StripeΛ࢖͑͹ Χʔυܾࡁ͘Β͍ͳΜͱ͔ͳΔ

  45. ͓͠·͍