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

10年間使い続けているPayPalからStripeへ?

 10年間使い続けているPayPalからStripeへ?

2018年7月26日に開催された、JP_Stripes in サッポロ Vol.2での登壇資料です。

Yausufmi Nishiyama

July 27, 2018
Tweet

More Decks by Yausufmi Nishiyama

Other Decks in Business

Transcript

  1. ೥ؒ࢖͍ଓ͚͍ͯΔ1BZ1BM͔Β4USJQF΁ʁ
    ʙ͋Δ΢ΣϒσΟϨΫλʔͷي੻ʙ
    +1@4USJQFT 4USJQFϢʔβʔάϧʔϓʣJOαοϙϩ7PM
    BU/&$ιϦϡʔγϣϯΠϊϕʔλ๺ւಓࢧࣾ

    View full-size slide

  2. ϋογϡλάɹ+1@4USJQFT
    ࣗݾ঺հ

    View full-size slide

  3. ϋογϡλάɹ+1@4USJQFT
    ࡾ౓ͷ൧ΑΓ৯΂Δ͜ͱɺҿΉ͜ͱ͕޷͖
    ੢ࢁɹହ࢙ʢʹ͠΍·ɹ΍͢;Έʣ
    גࣜձࣾδϟΫελϙδγϣϯɹ୅දऔక໾ʗσΟϨΫλʔ
    ೥݄૑ۀɺ೥݄๏ਓԽʢ๏ਓظ໨ʣ
    ೥݄೔ੜ·Εɺࡀ
    ༦ு܊܀ࢁொग़਎ɺࡳຈޫ੕ߴߍʗ๺ւֶԂେֶ๏ֶ෦ଔۀ
    খḺ੨৭ਃࠂձ࿈߹ձৗ೚ཧࣄʢ೥݄ʙʣ
    தখػߏൢ࿏։୓ࢧԉΞυόΠβʔʢ೥݄ʙʣ

    View full-size slide

  4. ϋογϡλάɹ+1@4USJQFT
    ੢ࢁɹହ࢙ʢʹ͠΍·ɹ΍͢;Έʣ
    ૑ۀ࣌ΑΓ.PWBCMF5ZQFΛϓϥοτϑΥʔϜʹ΢ΣϒαΠτ
    Λߏங
    ೥ɺ1SP/FUʢγοΫεɾΞύʔτࣾύʔτφʔʣՃໍ
    ೥ɺ.5՜ҔΛελʔτ
    ೥ɺ.5%%$.FFUVQ)0,,"*%0։࠵
    ೥ɺ΢ΣϒσΟϨΫγϣϯݚڀձʢԾশʣΛελʔτ
    ೥ɺ.5%%$.FFUVQ)0,,"*%0։࠵

    View full-size slide

  5. ϋογϡλάɹ+1@4USJQFT
    σΟϨΫλʔɹ໊
    σβΠφʔʢ)5.-$44ΤϯδχΞʣ໊
    .5ςϯϓϨʔτΤϯδχΞɹ໊
    ओͳۀ຿
    ɾ΢ΣϒαΠτߏஙʗ΢ΣϒίϯαϧςΟϯά
    ɾࣗࣾ։ൃ঎඼ൢച
    ɾ΢ΣϒγεςϜ։ൃ
    ɾҹ࡮෺σβΠϯ΄͔
    IUUQTXXXMBUODPN

    View full-size slide

  6. ϋογϡλάɹ+1@4USJQFT
    ௚ۙͷ੍࡞࣮੷

    View full-size slide

  7. ϋογϡλάɹ+1@4USJQFT
    ࣗࣾϓϩμΫτ4,&-&50/$"35ͷ։ൃɾൢച

    View full-size slide

  8. ϋογϡλάɹ+1@4USJQFT
    %ZOBNJD1SFWJFX
    *NBHF6QMPBE6UJMJUZ
    .PWBCMF5ZQF༻ϓϥάΠϯͷ։ൃɾൢച

    View full-size slide

  9. ϋογϡλάɹ+1@4USJQFT
    ࠓ೔ɺօ͞Μʹ͓࿩͢Δ͜ͱ

    View full-size slide

  10. ϋογϡλάɹ+1@4USJQFT
    w ฐࣾ੡඼ͱͦͷൢചྺ
    w ͜Ε·Ͱར༻͖ܾͯͨ͠ࡁαʔϏε
    w μ΢ϯϩʔυൢച΁ͷ௅ઓ
    w 4USJQFΛ࢖ͬͯΈΑ͏ͱࢥͬͨཧ༝
    w ࣮ࡍͲ͏ͩͬͨͷ͔

    View full-size slide

  11. ϋογϡλάɹ+1@4USJQFT
    ϊϯϓϩάϥϚʔͳϫλγͰ΋
    ࢥ͍ͬͯͨΑΓ΋ͣͬͱ؆୯ʹ
    ΍Γ͔ͨͬͨ͜ͱ͕࣮ݱͰ͖ͨ

    View full-size slide

  12. ϋογϡλάɹ+1@4USJQFT
    ฐࣾ੡඼ͱͦͷൢചྺ

    View full-size slide

  13. ϋογϡλάɹ+1@4USJQFT

    View full-size slide

  14. ϋογϡλάɹ+1@4USJQFT
    4,&-&50/$"35
    w ೥݄ϦϦʔε
    w )5.-ςϯϓϨʔτࣜͷγϣοϐϯάΧʔτ
    w ओʹ΢ΣϒσβΠφʔ͞Μ΍΢Σϒ੍࡞ձࣾ޲͚
    w ϓϥάΠϯػߏʹΑΔ֦ுੑ
    w ൢച૯਺
    w ೥݄ʹWFSTJPOϦϦʔε

    View full-size slide

  15. ϋογϡλάɹ+1@4USJQFT

    View full-size slide

  16. ϋογϡλάɹ+1@4USJQFT
    *NBHF6QMPBE6UJMJUZ
    w ೥݄ϦϦʔε
    w .PWBCMF5ZQFͷը૾ΞοϓϩʔυػೳΛڧԽ
    w ݸਓແঈ൛ɺ௨ৗ൛ͱ1SP൛Λఏڙ
    w ൢച૯਺

    View full-size slide

  17. ϋογϡλάɹ+1@4USJQFT

    View full-size slide

  18. ϋογϡλάɹ+1@4USJQFT
    %ZOBNJD1SFWJFX
    w ೥݄ϦϦʔε
    w .PWBCMF5ZQFͷϓϨϏϡʔػೳΛڧԽ
    w ௨ৗ൛ͱ1SP൛Λఏڙ
    w ൢച૯਺

    View full-size slide

  19. ϋογϡλάɹ+1@4USJQFT
    ͜Ε·Ͱར༻͖ܾͯͨ͠ࡁαʔϏε

    View full-size slide

  20. ϋογϡλάɹ+1@4USJQFT

    View full-size slide

  21. ϋογϡλάɹ+1@4USJQFT
    1BZ1BM
    w ೥ɺ·ͩݸਓࣄۀओ
    w Ͱ͖Δ͚ͩܦඅ͸͔͚ͨ͘ͳ͍
    w ςετ؀ڥʢ4BOECPYʣ͕ར༻Ͱ͖ͨ
    w "1*Ͱ͍Ζ͍ΖͰ͖ͦ͏
    w &$αΠτߏஙͷґཔ͕૿͖͑ͯͨ

    View full-size slide

  22. ϋογϡλάɹ+1@4USJQFT

    View full-size slide

  23. ϋογϡλάɹ+1@4USJQFT
    Ϋϩωί8ίϨΫτ
    w ओʹΫϥΠΞϯτͷ&$αΠτͰಋೖ
    w ֹ݄ҡ࣋අ͕͔͔Βͳ͍
    w ঎඼ൃૹ·ͰҰ؏Ͱ͖Δ
    w ୅Ҿ͖Ͱ΋ΫϨδοτΧʔυܾࡁ͕ར༻Ͱ͖Δ
    w Ϋϩωίͱ͍͏҆৺ײ

    View full-size slide

  24. ϋογϡλάɹ+1@4USJQFT
    μ΢ϯϩʔυൢച΁ͷ௅ઓ

    View full-size slide

  25. ϋογϡλάɹ+1@4USJQFT
    μ΢ϯϩʔυൢചʹ௅ઓͨ͠ཧ༝

    View full-size slide

  26. ϋογϡλάɹ+1@4USJQFT
    w ೖۚ֬ೝޙʹσʔλΛૹ෇͢Δʁ

    ٳΈͷ೔΋ରԠʁ

    ໷த΋ରԠʁ

    ग़ுத΋ରԠʁ
    w ͦ΋ͦ΋ࣗ෼͕ར༻ऀଆͩͬͨΒʁ
    w ෆਖ਼ར༻ͷՄೳੑͱͷτϨʔυΦϑ

    View full-size slide

  27. ϋογϡλάɹ+1@4USJQFT
    1BZ1BMͰ௅ઓʂ

    View full-size slide

  28. ϋογϡλάɹ+1@4USJQFT
    // read the post from PayPal system and add 'cmd'
    $req = 'cmd=_notify-synch';
    $tx_token = $_GET['tx'];
    $auth_token = "* αΠτͰൃߦ͞ΕΔIDτʔΫϯΛ͜͜ʹషΓ෇͚Δ *";
    $req .= "&tx=$tx_token&at=$auth_token";
    // post back to PayPal system to validate
    $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";
    $header .= "Content-Type: application/x-www-form-urlencoded\r\n
    $header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
    $fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr,
    // $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
    // $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errst
    // Ͱ͖Ε͹ HTTPS ʹͨ͠ํ͕ɺηΩϡϦςΟ͕ߴ·Δ.
    if (!$fp) {
    // HTTP ERROR
    echo "ERROR: HTTP error, [" . $errno . "] " . $errstr . "\n
    exit(1);
    }
    fputs ($fp, $header . $req);
    // read the body data
    $res = '';
    $headerdone = false;
    while (!feof($fp)) {
    $line = fgets ($fp, 1024);
    if (strcmp($line, "\r\n") == 0) {
    // read the header
    $headerdone = true;
    }
    else if ($headerdone) {
    // header has been read. now read the contents
    $res .= $line;

    View full-size slide

  29. ϋογϡλάɹ+1@4USJQFT
    1BZ1BMͰͷ࠳ં
    1%5ʜ ɹ*1/ʜ ɹͳʹͦΕඒຯ͍͠ͷʁ

    View full-size slide

  30. ϋογϡλάɹ+1@4USJQFT
    4USJQFΛ࢖ͬͯΈΑ͏ͱࢥͬͨཧ༝

    View full-size slide

  31. ϋογϡλάɹ+1@4USJQFT
    1BZ1BMޱ࠲ͷ໰୊
    4USJQFΛ࢖ͬͯΈΑ͏ͱࢥͬͨཧ༝ᶃ

    View full-size slide

  32. ϋογϡλάɹ+1@4USJQFT
    1BZ1BMޱ࠲ʹೖۚ
    ໾һି෇
    ๏ਓޱ࠲΁ৼସ

    View full-size slide

  33. ϋογϡλάɹ+1@4USJQFT
    1BZ1BMձһొ࿥ͷ໰୊
    4USJQFΛ࢖ͬͯΈΑ͏ͱࢥͬͨཧ༝ᶄ

    View full-size slide

  34. ϋογϡλάɹ+1@4USJQFT
    1BZ1BMձһొ࿥͕ඞཁ
    1BZ1BMձһ͡Όͳ͍
    ۜߦৼࠐͰࢧ෷͍͍ͨ

    View full-size slide

  35. ϋογϡλάɹ+1@4USJQFT
    1BZ1BMख਺ྉͷ໰୊
    4USJQFΛ࢖ͬͯΈΑ͏ͱࢥͬͨཧ༝ᶅ

    View full-size slide

  36. ϋογϡλάɹ+1@4USJQFT
    *NBHF6QMPBE6UJMJUZ1SP͕ചΕͨ৔߹
    ച্
    ख਺ྉ
    ʢ݄ؒച্ສԁະຬʣ
    Ҿग़ख਺ྉ
    ʢສԁະຬʣ
    ࠩҾऩೖ
    1BZ1BM ԁ
    ԁ

    ʢԁʣ
    ԁ ԁ
    4USJQF ԁ
    ԁ
    ʢʣ
    ԁ
    ఺͋ͨΓͷֹࠩԁʂ

    View full-size slide

  37. ϋογϡλάɹ+1@4USJQFT
    ࠓ·ͰʹऔΓ͜΅ͯ͠͠·ͬͨ૯ֹ
    ԁʂ
    ʢԁºʣ

    View full-size slide

  38. ϋογϡλάɹ+1@4USJQFT
    େऺञ৔Զྲྀͷ
    ੜϏʔϧʢΫϥγοΫʣ
    ഋ෼ʂ
    ʢ ×ʣ

    View full-size slide

  39. ϋογϡλάɹ+1@4USJQFT
    Ϋϩωί8ίϨΫτͷॏେͳ໰୊
    4USJQFΛ࢖ͬͯΈΑ͏ͱࢥͬͨཧ༝ᶆ

    View full-size slide

  40. ϋογϡλάɹ+1@4USJQFT
    ͋Δ೔ɺΫϥΠΞϯτ͔Βಧ͍ͨϝʔϧ
    'BDFCPPL΍MJOFʹషΓ෇͚ͨ
    ฐࣾ63-͔ΒϦϯΫ͢ΔͱΫϨδοτΧʔυ෷͍͕
    ͓ࢧ෷͍खଓ͖Τϥʔͱදࣔ͞Ε·͢ɻ
    Ͳ͏ʹ͔ͳΓ·ͤΜͰ͠ΐ͏͔ʁ

    View full-size slide

  41. ϋογϡλάɹ+1@4USJQFT

    View full-size slide

  42. ϋογϡλάɹ+1@4USJQFT

    View full-size slide

  43. ϋογϡλάɹ+1@4USJQFT
    ϠϚτϑΟφϯγϟϧ΁໰͍߹Θͤͨ
    Ұ෦εϚʔτϑΥϯͷ࢓༷ʹΑΓ
    (PPHMFΞϓϦʗ:BIPPΞϓϦʹͯ৽ن΢Οϯυ΢Λ։͘ߏஙʹ͓ͯ͠Γ·͢ͱ
    ඞཁ৘ใʢύϥϝʔλʣ͕ൈ͚མͪͯ͠·͏ࣄ৅͕֬ೝ͞Ε͓ͯΓ·͢ɻ
    ղܾࡦͱக͠·ͯ͠͸ɺ৽ن΢Οϯυ΢Λ্ཱͪ͛ͳ͍Α͏ͳߏஙʹ
    มߋ͍͖ͨͩ·͢ͱɺ্هࣄ৅͸ൃੜ͠ͳ͘ͳΔ΋ͱͷࢥΘΕ·͢ɻ

    View full-size slide

  44. ϋογϡλάɹ+1@4USJQFT
    ΞϓϦ಺ϒϥ΢βʜ

    View full-size slide

  45. ϋογϡλάɹ+1@4USJQFT
    μ΢ϯϩʔυൢച΁ͷ࠶௅ઓ
    4USJQFΛ࢖ͬͯΈΑ͏ͱࢥͬͨཧ༝ᶇ

    View full-size slide

  46. ϋογϡλάɹ+1@4USJQFT
    1)1ͳΒଟগ͸ॻ͚Δʢͱࢥ͏ʣ

    View full-size slide

  47. ϋογϡλάɹ+1@4USJQFT
    ॻ͍ͯΈͨɻ
    w DPOpHQIQΛಡΈࠐΉ
    w ঎඼໊ͱՁ֨Λ)5.-͔Β

    1045Ͱड͚औΔ
    w ϥΠηϯε൪߸Λੜ੒
    w ܾࡁ׬ྃޙɺϝʔϧΛૹ৴
    w μ΢ϯϩʔυը໘ϔࣗಈసૹ

    ʢ50,&/ɺ঎඼*%Λ౉͢ʣ
    w μ΢ϯϩʔυը໘Ͱ঎඼*%Ͱ

    63-Λදࣔʢ50,&/Ͱ෼ذʣ

    View full-size slide

  48. ϋογϡλάɹ+1@4USJQFT
    Ͱ͖ͨʂ
    IUUQTXXXKVYUBQPTJUJPOKQJNBHFVQMPBEVUJMJUZ

    View full-size slide

  49. ϋογϡλάɹ+1@4USJQFT
    ࣮ࡍɺͲ͏ͩͬͨͷ͔

    View full-size slide

  50. ϋογϡλάɹ+1@4USJQFT
    w ࢥ͍ͬͯͨΑΓ΋؆୯ɺ͔͠΋ࣗ༝ʹͰ͖ͨ
    w ͨͩɺ+BWB4DSJQUͰ؆୯ಋೖʂͳهࣄ͕ଟ͗͢
    w DIBSHFQIQ͚ͩͰ΋ࢥ͍ͷ··ʹΧελϚΠζ
    w ςετϞʔυ͔Βͷ੾Γସ͑΋؆୯ͩͬͨ

    View full-size slide

  51. ϋογϡλάɹ+1@4USJQFT
    ೥ؒ࢖͍ଓ͚͍ͯΔ1BZ1BM͔Β4USJQF΁ʁ
    ʙ͋Δ΢ΣϒσΟϨΫλʔͷي੻ʙ
    גࣜձࣾδϟΫελϙδγϣϯɹ੢ࢁɹହ࢙
    Let’s
    TRY!

    View full-size slide