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. ϋογϡλάɹ+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;
  2. ϋογϡλάɹ+1@4USJQFT *NBHF6QMPBE6UJMJUZ1SP͕ചΕͨ৔߹ ച্ ख਺ྉ ʢ݄ؒച্ສԁະຬʣ Ҿग़ख਺ྉ ʢສԁະຬʣ ࠩҾऩೖ 1BZ1BM 

    ԁ  ԁ
 ʢ ԁʣ ԁ  ԁ 4USJQF  ԁ  ԁ ʢʣ  ԁ ఺͋ͨΓͷֹࠩԁʂ
  3. ϋογϡλάɹ+1@4USJQFT ॻ͍ͯΈͨɻ w DPOpHQIQΛಡΈࠐΉ w ঎඼໊ͱՁ֨Λ)5.-͔Β
 1045Ͱड͚औΔ w ϥΠηϯε൪߸Λੜ੒ w

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