3v4l.org

run code in 300+ PHP versions simultaneously
<?php //SPS払出ハッシュキー $key_for_checksum = "a2d8648d0246a924bed081433930f868c8100224"; //ポストパラメータ $payMethod = "credit"; //支払方法 $merchantId = "99999"; //マーチャントID $serviceId = "001"; //サービスID $custCode = "9999999"; //顧客ID $spsCustNo = "9999999"; //SPS顧客ID $spsPaymentNo = "00000"; //SPS支払方法管理番号 $orderId = "9999999999"; //購入ID $itemId = "9999"; //商品ID $payItemId = "00000"; //外部決済機関商品ID $itemName = "テスト商品名"; //商品名称 $tax = "99999"; //税額 $amount = "99999"; //金額(税込) $payType = "1"; //購入タイプ $autoChargeType = ""; //自動課金タイプ $serviceType = "0"; //サービスタイプ $divSettele = ""; //決済区分 $lastChargeMonth = ""; //最終課金月 $campType = ""; //キャンペーンタイプ $trackingId = ""; //トラッキングID $terminalType = "1"; //顧客利用端末タイプ $successUrl = "https://stbfep.sps-system.com/Extra/BuyRequestAction.do?success=true"; //決済完了時URL $cancelUrl = "https://stbfep.sps-system.com/Extra/BuyRequestAction.do?cancel=true"; //決済キャンセル 時URL $errorUrl = "https://stbfep.sps-system.com/Extra/BuyRequestAction.do?error=true"; //エラー時URL $pageconUrl = "https://stbfep.sps-system.com/Extra/pageconurl.do"; //決済通知用CGI $free1 = ""; //自由欄1 $free2 = ""; //自由欄2 $free3 = ""; //自由欄3 $dtlRowno = array("1","2"); //明細行番号 (配列) $dtlItemId = array("prodID001","prodID001"); //明細商品ID (配列) $dtlItemName = array("テスト商品名1","テスト商品名2"); //明細商品名称 (配列) $dtlItemCount = array("1","1"); //明細数量 (配列) $dtlTax = array("150","150"); //明細税額 (配列) $dtlAmount = array("3000","3000"); //明細金額(税込)(配列) $requestDate = "20080505175959"; //リクエスト日時 $limitSecond = "600"; //リクエスト許容時間 //■■■■■■■■ // 文字連結の作成 //■■■■■■■■ //ポストパラメータの連結 $joinParam = trim($payMethod) .trim($merchantId) .trim($serviceId) .trim($custCode) .trim($spsCustNo) .trim($spsPaymentNo) .trim($orderId) .trim($itemId) .trim($payItemId) .trim($itemName) .trim($tax) .trim($amount) .trim($payType) .trim($autoChargeType) .trim($serviceType) .trim($divSettele) .trim($lastChargeMonth) .trim($campType) .trim($trackingId) .trim($terminalType) .trim($successUrl) .trim($cancelUrl) .trim($errorUrl) .trim($pageconUrl) .trim($free1) .trim($free2) .trim($free3); //明細部分 $count = count($dtlRowno); for ($i = 0; $i < $count; $i++) { $joinParam = $joinParam .$dtlRowno[$i] .$dtlItemId[$i] .$dtlItemName[$i] .$dtlItemCount[$i] .$dtlTax[$i] .$dtlAmount[$i]; } $joinParam = $joinParam .$requestDate .$limitSecond; //SPS払出ハッシュキーの連結 $joinParam = $joinParam .$key_for_checksum; //連結文字列表示 print "<h1>チェックサム生成サンプルプログラム</h1>"; print "<h2>連結文字列表示</h2>"; print $joinParam; print "<br>"; //Shift-JISの連結文字列をUTF-8に文字コード変換 $joinParamUTF8 = mb_convert_encoding($joinParam, "UTF-8", "SJIS"); //ハッシュコード算出 $sps_hashcode = sha1($joinParamUTF8); //ハッシュコード表示 print "<h2>ハッシュコード表示</h2>"; print $sps_hashcode; //終了 exit;
Output for 5.6.0 - 5.6.27, 7.0.0 - 7.0.12
Parse error: syntax error, unexpected '$errorUrl' (T_VARIABLE) in /in/rAr3r on line 29
Process exited with code 255.

preferences:
150.01 ms | 1254 KiB | 6 Q