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

ecnight-webpay

Kengo Hamasaki
November 17, 2014

 ecnight-webpay

ECにおける決済のフローで知っておきたいこと at EC Night #1
http://ec-night.doorkeeper.jp/events/16355

Kengo Hamasaki

November 17, 2014
Tweet

More Decks by Kengo Hamasaki

Other Decks in Technology

Transcript

  1. WebPay require 'webpay' webpay = WebPay.new('test_secret_eHn4TTgsGguBcW764a2KA8Yd') webpay.charge.create( currency: ‘jpy’, amount:

    400, card: {number: ‘4242-4242-4242-4242’, exp_month: 11, exp_year: 2014, cvc: ‘123’, name: ‘KENGO HAMASAKI’} ) https://webpay.jp
  2. => #<WebPay::ChargeResponse id: "ch_70U72DaDGbzE492" object: "charge" livemode: false amount: 400

    card: #<WebPay::CardResponse> created: 1416216426 currency: "jpy" paid: true captured: true refunded: false amount_refunded: 0 customer: nil recursion: nil shop: nil description: nil failure_message: nil expire_time: nil fees: [#<WebPay::ChargeFeeResponse>]
  3. ֬ఆͯ͠ ϨδʹਐΉ ܾࡁ৘ใΛ ೖྗ͢Δ ߪೖ಺༰Λ ֬ೝ͢Δ ߪೖΛ ׬ྃ͢Δ ! "

    # $ https://www.amazon.co.jp/gp/buy/spc/handlers/display.html
  4. ֬ఆͯ͠ ϨδʹਐΉ ܾࡁ৘ใΛ ೖྗ͢Δ ߪೖ಺༰Λ ֬ೝ͢Δ ߪೖΛ ׬ྃ͢Δ ! "

    # $ https://www.amazon.co.jp/gp/buy/spc/handlers/display.html
  5. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใʹ໰୊

    w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ༗ޮͳΧʔυ͕ ೖྗ͞Εͨʁ & '
  6. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใʹ໰୊

    w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ༗ޮͳΧʔυ͕ ೖྗ͞Εͨʁ ࢦఆֹۚͰ ܾࡁͰ͖ͨʁ & '
  7. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใʹ໰୊

    w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ༗ޮͳΧʔυ͕ ೖྗ͞Εͨʁ ࢦఆֹۚͰ ܾࡁͰ͖ͨʁ Χʔυͷঢ়ଶʹ໰୊ % & & '
  8. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใʹ໰୊

    w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ༗ޮͳΧʔυ͕ ೖྗ͞Εͨʁ ࢦఆֹۚͰ ܾࡁͰ͖ͨʁ Χʔυͷঢ়ଶʹ໰୊ % & & ' w ϑΥʔϜͷೖྗ͕ਏ͍ʜ w Χʔυखݩʹͳͯ͘ਏ͍ʜ (
  9. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใʹ໰୊

    w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ༗ޮͳΧʔυ͕ ೖྗ͞Εͨʁ ࢦఆֹۚͰ ܾࡁͰ͖ͨʁ Χʔυͷঢ়ଶʹ໰୊ % & & ' w ϑΥʔϜͷೖྗ͕ਏ͍ʜ w Χʔυखݩʹͳͯ͘ਏ͍ʜ w ϖʔδભҠଟͯ͘ਏ͍ʜ w Χʔυձࣾʹి࿩ਏ͍ʜ w ଞͷΧʔυͳͯ͘ਏ͍ʜ ( (
  10. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใʹ໰୊

    w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ༗ޮͳΧʔυ͕ ೖྗ͞Εͨʁ ࢦఆֹۚͰ ܾࡁͰ͖ͨʁ Χʔυͷঢ়ଶʹ໰୊ % & & ' w ϑΥʔϜͷೖྗ͕ਏ͍ʜ w Χʔυखݩʹͳͯ͘ਏ͍ʜ w ϖʔδભҠଟͯ͘ਏ͍ʜ w Χʔυձࣾʹి࿩ਏ͍ʜ w ଞͷΧʔυͳͯ͘ਏ͍ʜ ( (
  11. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใ

    ΋͘͠͸ঢ়ଶʹ໰୊ w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ͜ͷΧʔυͰ 999ԁԾച্ ࣮ച্Խ͢Δ Χʔυͷঢ়ଶʹ໰୊ % & & ' w ϑΥʔϜͷೖྗ͕ਏ͍ʜ w Χʔυखݩʹͳͯ͘ਏ͍ʜ w ϖʔδભҠଟͯ͘ਏ͍ʜ w Χʔυձࣾʹి࿩ਏ͍ʜ w ଞͷΧʔυͳͯ͘ਏ͍ʜ ( (
  12. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใ

    ΋͘͠͸ঢ়ଶʹ໰୊ w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ͜ͷΧʔυͰ 999ԁԾച্ & ' w ϑΥʔϜͷೖྗ͕ਏ͍ʜ w Χʔυखݩʹͳͯ͘ਏ͍ʜ ( ࣮ച্Խ͢Δ
  13. WebPay require 'webpay' webpay = WebPay.new('test_secret_eHn4TTgsGguBcW764a2KA8Yd') webpay.charge.create( currency: ‘jpy’, amount:

    400, + capture: false, card: {number: ‘4242-4242-4242-4242’, exp_month: 11, exp_year: 2014, cvc: ‘123’, name: ‘KENGO HAMASAKI’} )
  14. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใ

    ΋͘͠͸ঢ়ଶʹ໰୊ w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ͜ͷΧʔυͰ 999ԁԾച্ & ' w ϑΥʔϜͷೖྗ͕ਏ͍ʜ w Χʔυखݩʹͳͯ͘ਏ͍ʜ ( ࣮ച্Խ͢Δ
  15. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใ

    ΋͘͠͸ঢ়ଶʹ໰୊ w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ͜ͷΧʔυͰ 999ԁԾച্ & ' w ϑΥʔϜͷೖྗ͕ਏ͍ʜ w Χʔυखݩʹͳͯ͘ਏ͍ʜ ( ࣮ച্Խ͢Δ
  16. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใ

    ΋͘͠͸ঢ়ଶʹ໰୊ w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ͜ͷΧʔυͰ 999ԁԾച্ & ' w ϑΥʔϜͷೖྗ͕ਏ͍ w Χʔυखݩʹͳͯ͘ਏ͍ ( ࣮ച্Խ͢Δ
  17. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ )

    ܾࡁձࣾ * όοΫΤϯυ ! * όοΫΤϯυ + + + +
  18. WebPay require 'webpay' webpay = WebPay.new('test_secret_eHn4TTgsGguBcW764a2KA8Yd') webpay.charge.create( currency: ‘jpy’, amount:

    400, card: + tok_u7fWx6xObdff - {number: ‘4242-4242-4242-4242’, - exp_month: 11, - exp_year: 2014, - cvc: ‘123’, - name: ‘KENGO HAMASAKI’} )
  19. ܾࡁ৘ใΛ ೖྗ͢Δ ! ߪೖ಺༰Λ ֬ೝ͢Δ # ߪೖΛ ׬ྃ͢Δ $ Χʔυͷ৘ใʹ໰୊

    w ଧͪؒҧ͍ʁ w ଞͷΧʔυʁ ༗ޮͳΧʔυ͕ ೖྗ͞Εͨʁ ࢦఆֹۚͰ ܾࡁͰ͖ͨʁ Χʔυͷঢ়ଶʹ໰୊ % & & ' w ϑΥʔϜͷೖྗ͕ਏ͍ʜ w Χʔυखݩʹͳͯ͘ਏ͍ʜ w ϖʔδભҠଟͯ͘ਏ͍ʜ w Χʔυձࣾʹి࿩ਏ͍ʜ w ଞͷΧʔυͳͯ͘ਏ͍ʜ ( (