JP_Stripes Connect 2019 登壇資料

42bb3169f708bebf80653cbce796c311?s=47 Yausufmi Nishiyama
March 21, 2019
840

JP_Stripes Connect 2019 登壇資料

昨年夏の「10年間使い続けているPayPalからStripeへ? 〜 あるウェブディレクターの軌跡 〜」には実は続編があった?

42bb3169f708bebf80653cbce796c311?s=128

Yausufmi Nishiyama

March 21, 2019
Tweet

Transcript

  1. 28.

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

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

    // 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; ϋογϡλάɹ+14$
  3. 42.

    ϋογϡλάɹ+14$ ॻ͍ͯΈͨɻ w DPOpHQIQΛಡΈࠐΉ w ঎඼໊ͱՁ֨Λ)5.-͔Β
 1045Ͱड͚औΔ w ϥΠηϯε൪߸Λੜ੒ w

    ܾࡁ׬ྃޙɺϝʔϧΛૹ৴ w μ΢ϯϩʔυը໘ϔࣗಈసૹ
 ʢ50,&/ɺ঎඼*%Λ౉͢ʣ w μ΢ϯϩʔυը໘Ͱ঎඼*%Ͱ
 63-Λදࣔʢ50,&/Ͱ෼ذʣ
  4. 47.

    ϋογϡλάɹ+14$ Α͘ݟΔͱ ؊৺ͳ෦෼͕ ͬͦ͝Γൈ͚͍ͯͨ ʢͲͷλΠϛϯά͔ෆ໌ʣ ސ٬Λ࡞੒ DVTUPNFSa4USJQFa$VTUPNFSDSFBUF BSSBZ  FNBJMFNBJM

     TPVSDFUPLFO  νϟʔδΛ࡞੒ DIBSHFa4USJQFa$IBSHFDSFBUF BSSBZ  EFTDSJQUJPOQSPEVDU  DVTUPNFSDVTUPNFSJE  BNPVOUQSJDF  DVSSFODZKQZ 
  5. 48.

    ϋογϡλάɹ+14$ ࣮ࡍʹ΍ͬͨ͜ͱ  μογϡϘʔυͷʮ։ൃऀʯϝχϡʔͷʮϩάʯ͔Β֘౰ͷUPLFOTΛ։͘  $IFDLPVUKT͔Βͷ1045ʹର͠Ԡ౴ͨ͠಺༰ʹ͋ΔʮJEUPL@IPHFIPHF ʯΛݟ͚ͭɺ UPL@IPHFIPHF෦෼Λίϐʔ  DIBSHFQIQͷʮސ٬Λ࡞੒ʯʹ͋ΔTPVSDFʹͦΕΛ௚઀هೖ


    ʢ1045಺༰ʹ͋ΔϝʔϧΞυϨε΋FNBJMʹهೖʣ  ʮνϟʔδΛ࡞੒ʯͷEFTDSJQUJPOͱBNPVOUʹ΋௚઀هೖ  ϝʔϧૹ৴ͳͲෆཁͳ෦෼͸࡟আ  DIBSHFQIQΛDIBSHF@GVHBQIQͳͲͱϦωʔϜͯ͠Ξοϓϩʔυ  ϒϥ΢β͔ΒDIBSHF@GVHBQIQʹΞΫηε
 ʢࢲ͸͜͜Ͱ׬ྃը໘΁ϦμΠϨΫτ͢ΔΑ͏ʹ͠·ͨ͠ʣ
  6. 49.

    ϋογϡλάɹ+14$ ࣮ࡍʹ΍ͬͨ͜ͱ  μογϡϘʔυͷʮ։ൃऀʯϝχϡʔͷʮϩάʯ͔Β֘౰ͷUPLFOTΛ։͘  $IFDLPVUKT͔Βͷ1045ʹର͠Ԡ౴ͨ͠಺༰ʹ͋ΔʮJEUPL@IPHFIPHF ʯΛݟ͚ͭɺ UPL@IPHFIPHF෦෼Λίϐʔ  DIBSHFQIQͷʮސ٬Λ࡞੒ʯʹ͋ΔTPVSDFʹͦΕΛ௚઀هೖ


    ʢ1045಺༰ʹ͋ΔϝʔϧΞυϨε΋FNBJMʹهೖʣ  ʮνϟʔδΛ࡞੒ʯͷEFTDSJQUJPOͱBNPVOUʹ΋௚઀هೖ  ϝʔϧૹ৴ͳͲෆཁͳ෦෼͸࡟আ  DIBSHFQIQΛDIBSHF@GVHBQIQͳͲͱϦωʔϜͯ͠Ξοϓϩʔυ  ϒϥ΢β͔ΒDIBSHF@GVHBQIQʹΞΫηε
 ʢࢲ͸͜͜Ͱ׬ྃը໘΁ϦμΠϨΫτ͢ΔΑ͏ʹ͠·ͨ͠ʣ  Θ͔Δ·Ͱαϙʔτʹ࿈བྷ  ϚχϡΞϧΛ܁Γฦ͠ಡΉ  ͱʹ͔͘ςετ؀ڥͰ֬ೝ