3v4l.org

run code in 300+ PHP versions simultaneously
<?php /********************************************************************************************************* 【概要】 与信要求 サンプルコード [プログラム言語] PHP [サーバサイド文字コード] UTF-8 [使用ライブラリ] PEARライブラリのHTTP_Requestモジュール **********************************************************************************************************/ // API送信データ $merchant_id = "62022"; $service_id = "001"; $cust_code = "SPSTestUser0001"; $order_id = "dcd297c04fc88974c7df19054171856b"; $item_id = "ITEMID00000000000000000000000001"; $item_name = "テスト商品"; $tax = "1"; $amount = "1"; $free1 = ""; $free2 = ""; $free3 = ""; $order_rowno = ""; $sps_cust_info_return_flg = "1"; $cc_number = "5250729026209007"; $cc_expiration = "201103"; $security_code = "798"; $cust_manage_flg = "0"; $encrypted_flg = "0"; $request_date = "20150605023010"; $limit_second = ""; $hashkey = "d7b6640cc5d286cbceab99b53bf74870cf6bce9c"; // Shift_JIS変換 $merchant_id = mb_convert_encoding($merchant_id, 'Shift_JIS', 'UTF-8'); $service_id = mb_convert_encoding($service_id, 'Shift_JIS', 'UTF-8'); $cust_code = mb_convert_encoding($cust_code, 'Shift_JIS', 'UTF-8'); $order_id = mb_convert_encoding($order_id, 'Shift_JIS', 'UTF-8'); $item_id = mb_convert_encoding($item_id, 'Shift_JIS', 'UTF-8'); $item_name = mb_convert_encoding($item_name, 'Shift_JIS', 'UTF-8'); $tax = mb_convert_encoding($tax, 'Shift_JIS', 'UTF-8'); $amount = mb_convert_encoding($amount, 'Shift_JIS', 'UTF-8'); $free1 = mb_convert_encoding($free1, 'Shift_JIS', 'UTF-8'); $free2 = mb_convert_encoding($free2, 'Shift_JIS', 'UTF-8'); $free3 = mb_convert_encoding($free3, 'Shift_JIS', 'UTF-8'); $order_rowno = mb_convert_encoding($order_rowno, 'Shift_JIS', 'UTF-8'); $sps_cust_info_return_flg = mb_convert_encoding($sps_cust_info_return_flg, 'Shift_JIS', 'UTF-8'); $cc_number = mb_convert_encoding($cc_number, 'Shift_JIS', 'UTF-8'); $cc_expiration = mb_convert_encoding($cc_expiration, 'Shift_JIS', 'UTF-8'); $security_code = mb_convert_encoding($security_code, 'Shift_JIS', 'UTF-8'); $cust_manage_flg = mb_convert_encoding($cust_manage_flg, 'Shift_JIS', 'UTF-8'); $encrypted_flg = mb_convert_encoding($encrypted_flg, 'Shift_JIS', 'UTF-8'); $request_date = mb_convert_encoding($request_date, 'Shift_JIS', 'UTF-8'); $limit_second = mb_convert_encoding($limit_second, 'Shift_JIS', 'UTF-8'); $hashkey = mb_convert_encoding($hashkey, 'Shift_JIS', 'UTF-8'); // 送信情報データ連結 $result = $merchant_id . $service_id . $cust_code . $order_id . $item_id . $item_name . $tax . $amount . $free1 . $free2 . $free3 . $order_rowno . $sps_cust_info_return_flg . $cc_number . $cc_expiration . $security_code . $cust_manage_flg . $encrypted_flg . $request_date . $limit_second . $hashkey; // SHA1変換 $sps_hashcode = sha1( $result ); // POSTデータ生成 $postdata = "<?xml version=\"1.0\" encoding=\"Shift_JIS\"?>" . "<sps-api-request id=\"ST01-00101-101\">" . "<merchant_id>" . $merchant_id . "</merchant_id>" . "<service_id>" . $service_id . "</service_id>" . "<cust_code>" . $cust_code . "</cust_code>" . "<order_id>" . $order_id . "</order_id>" . "<item_id>" . $item_id . "</item_id>" . "<item_name>" . base64_encode($item_name) . "</item_name>" . "<tax>" . $tax . "</tax>" . "<amount>" . $amount . "</amount>" . "<free1>" . base64_encode($free1) . "</free1>" . "<free2>" . base64_encode($free2) . "</free2>" . "<free3>" . base64_encode($free3) . "</free3>" . "<order_rowno>" . $order_rowno . "</order_rowno>" . "<sps_cust_info_return_flg>" . $sps_cust_info_return_flg . "</sps_cust_info_return_flg>" . "<dtls>" . "</dtls>" . "<pay_method_info>" . "<cc_number>" . $cc_number . "</cc_number>" . "<cc_expiration>" . $cc_expiration . "</cc_expiration>" . "<security_code>" . $security_code . "</security_code>" . "<cust_manage_flg>" . $cust_manage_flg . "</cust_manage_flg>" . "</pay_method_info>" . "<pay_option_manage>" . "</pay_option_manage>" . "<encrypted_flg>" . $encrypted_flg . "</encrypted_flg>" . "<request_date>" . $request_date . "</request_date>" . "<limit_second>" . $limit_second . "</limit_second>" . "<sps_hashcode>" . $sps_hashcode . "</sps_hashcode>" . "</sps-api-request>"; $url = "https://stbfep.sps-system.com/api/xmlapi.do"; // データ送信処理 echo $url.'<br/>'; echo $merchant_id . $service_id . ' - '. $hashkey.'<br/>'; echo $postdata.'<br/>'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZiS1U
function name:  (null)
number of ops:  265
compiled vars:  !0 = $merchant_id, !1 = $service_id, !2 = $cust_code, !3 = $order_id, !4 = $item_id, !5 = $item_name, !6 = $tax, !7 = $amount, !8 = $free1, !9 = $free2, !10 = $free3, !11 = $order_rowno, !12 = $sps_cust_info_return_flg, !13 = $cc_number, !14 = $cc_expiration, !15 = $security_code, !16 = $cust_manage_flg, !17 = $encrypted_flg, !18 = $request_date, !19 = $limit_second, !20 = $hashkey, !21 = $result, !22 = $sps_hashcode, !23 = $postdata, !24 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, '62022'
   17     1        ASSIGN                                                   !1, '001'
   18     2        ASSIGN                                                   !2, 'SPSTestUser0001'
   19     3        ASSIGN                                                   !3, 'dcd297c04fc88974c7df19054171856b'
   20     4        ASSIGN                                                   !4, 'ITEMID00000000000000000000000001'
   21     5        ASSIGN                                                   !5, '%E3%83%86%E3%82%B9%E3%83%88%E5%95%86%E5%93%81'
   22     6        ASSIGN                                                   !6, '1'
   23     7        ASSIGN                                                   !7, '1'
   24     8        ASSIGN                                                   !8, ''
   25     9        ASSIGN                                                   !9, ''
   26    10        ASSIGN                                                   !10, ''
   27    11        ASSIGN                                                   !11, ''
   28    12        ASSIGN                                                   !12, '1'
   29    13        ASSIGN                                                   !13, '5250729026209007'
   30    14        ASSIGN                                                   !14, '201103'
   31    15        ASSIGN                                                   !15, '798'
   32    16        ASSIGN                                                   !16, '0'
   33    17        ASSIGN                                                   !17, '0'
   34    18        ASSIGN                                                   !18, '20150605023010'
   35    19        ASSIGN                                                   !19, ''
   36    20        ASSIGN                                                   !20, 'd7b6640cc5d286cbceab99b53bf74870cf6bce9c'
   39    21        INIT_FCALL                                               'mb_convert_encoding'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 'Shift_JIS'
         24        SEND_VAL                                                 'UTF-8'
         25        DO_ICALL                                         $46     
         26        ASSIGN                                                   !0, $46
   40    27        INIT_FCALL                                               'mb_convert_encoding'
         28        SEND_VAR                                                 !1
         29        SEND_VAL                                                 'Shift_JIS'
         30        SEND_VAL                                                 'UTF-8'
         31        DO_ICALL                                         $48     
         32        ASSIGN                                                   !1, $48
   41    33        INIT_FCALL                                               'mb_convert_encoding'
         34        SEND_VAR                                                 !2
         35        SEND_VAL                                                 'Shift_JIS'
         36        SEND_VAL                                                 'UTF-8'
         37        DO_ICALL                                         $50     
         38        ASSIGN                                                   !2, $50
   42    39        INIT_FCALL                                               'mb_convert_encoding'
         40        SEND_VAR                                                 !3
         41        SEND_VAL                                                 'Shift_JIS'
         42        SEND_VAL                                                 'UTF-8'
         43        DO_ICALL                                         $52     
         44        ASSIGN                                                   !3, $52
   43    45        INIT_FCALL                                               'mb_convert_encoding'
         46        SEND_VAR                                                 !4
         47        SEND_VAL                                                 'Shift_JIS'
         48        SEND_VAL                                                 'UTF-8'
         49        DO_ICALL                                         $54     
         50        ASSIGN                                                   !4, $54
   44    51        INIT_FCALL                                               'mb_convert_encoding'
         52        SEND_VAR                                                 !5
         53        SEND_VAL                                                 'Shift_JIS'
         54        SEND_VAL                                                 'UTF-8'
         55        DO_ICALL                                         $56     
         56        ASSIGN                                                   !5, $56
   45    57        INIT_FCALL                                               'mb_convert_encoding'
         58        SEND_VAR                                                 !6
         59        SEND_VAL                                                 'Shift_JIS'
         60        SEND_VAL                                                 'UTF-8'
         61        DO_ICALL                                         $58     
         62        ASSIGN                                                   !6, $58
   46    63        INIT_FCALL                                               'mb_convert_encoding'
         64        SEND_VAR                                                 !7
         65        SEND_VAL                                                 'Shift_JIS'
         66        SEND_VAL                                                 'UTF-8'
         67        DO_ICALL                                         $60     
         68        ASSIGN                                                   !7, $60
   47    69        INIT_FCALL                                               'mb_convert_encoding'
         70        SEND_VAR                                                 !8
         71        SEND_VAL                                                 'Shift_JIS'
         72        SEND_VAL                                                 'UTF-8'
         73        DO_ICALL                                         $62     
         74        ASSIGN                                                   !8, $62
   48    75        INIT_FCALL                                               'mb_convert_encoding'
         76        SEND_VAR                                                 !9
         77        SEND_VAL                                                 'Shift_JIS'
         78        SEND_VAL                                                 'UTF-8'
         79        DO_ICALL                                         $64     
         80        ASSIGN                                                   !9, $64
   49    81        INIT_FCALL                                               'mb_convert_encoding'
         82        SEND_VAR                                                 !10
         83        SEND_VAL                                                 'Shift_JIS'
         84        SEND_VAL                                                 'UTF-8'
         85        DO_ICALL                                         $66     
         86        ASSIGN                                                   !10, $66
   50    87        INIT_FCALL                                               'mb_convert_encoding'
         88        SEND_VAR                                                 !11
         89        SEND_VAL                                                 'Shift_JIS'
         90        SEND_VAL                                                 'UTF-8'
         91        DO_ICALL                                         $68     
         92        ASSIGN                                                   !11, $68
   51    93        INIT_FCALL                                               'mb_convert_encoding'
         94        SEND_VAR                                                 !12
         95        SEND_VAL                                                 'Shift_JIS'
         96        SEND_VAL                                                 'UTF-8'
         97        DO_ICALL                                         $70     
         98        ASSIGN                                                   !12, $70
   52    99        INIT_FCALL                                               'mb_convert_encoding'
        100        SEND_VAR                                                 !13
        101        SEND_VAL                                                 'Shift_JIS'
        102        SEND_VAL                                                 'UTF-8'
        103        DO_ICALL                                         $72     
        104        ASSIGN                                                   !13, $72
   53   105        INIT_FCALL                                               'mb_convert_encoding'
        106        SEND_VAR                                                 !14
        107        SEND_VAL                                                 'Shift_JIS'
        108        SEND_VAL                                                 'UTF-8'
        109        DO_ICALL                                         $74     
        110        ASSIGN                                                   !14, $74
   54   111        INIT_FCALL                                               'mb_convert_encoding'
        112        SEND_VAR                                                 !15
        113        SEND_VAL                                                 'Shift_JIS'
        114        SEND_VAL                                                 'UTF-8'
        115        DO_ICALL                                         $76     
        116        ASSIGN                                                   !15, $76
   55   117        INIT_FCALL                                               'mb_convert_encoding'
        118        SEND_VAR                                                 !16
        119        SEND_VAL                                                 'Shift_JIS'
        120        SEND_VAL                                                 'UTF-8'
        121        DO_ICALL                                         $78     
        122        ASSIGN                                                   !16, $78
   56   123        INIT_FCALL                                               'mb_convert_encoding'
        124        SEND_VAR                                                 !17
        125        SEND_VAL                                                 'Shift_JIS'
        126        SEND_VAL                                                 'UTF-8'
        127        DO_ICALL                                         $80     
        128        ASSIGN                                                   !17, $80
   57   129        INIT_FCALL                                               'mb_convert_encoding'
        130        SEND_VAR                                                 !18
        131        SEND_VAL                                                 'Shift_JIS'
        132        SEND_VAL                                                 'UTF-8'
        133        DO_ICALL                                         $82     
        134        ASSIGN                                                   !18, $82
   58   135        INIT_FCALL                                               'mb_convert_encoding'
        136        SEND_VAR                                                 !19
        137        SEND_VAL                                                 'Shift_JIS'
        138        SEND_VAL                                                 'UTF-8'
        139        DO_ICALL                                         $84     
        140        ASSIGN                                                   !19, $84
   59   141        INIT_FCALL                                               'mb_convert_encoding'
        142        SEND_VAR                                                 !20
        143        SEND_VAL                                                 'Shift_JIS'
        144        SEND_VAL                                                 'UTF-8'
        145        DO_ICALL                                         $86     
        146        ASSIGN                                                   !20, $86
   65   147        CONCAT                                           ~88     !0, !1
   66   148        CONCAT                                           ~89     ~88, !2
   67   149        CONCAT                                           ~90     ~89, !3
   68   150        CONCAT                                           ~91     ~90, !4
   69   151        CONCAT                                           ~92     ~91, !5
   70   152        CONCAT                                           ~93     ~92, !6
   71   153        CONCAT                                           ~94     ~93, !7
   72   154        CONCAT                                           ~95     ~94, !8
   73   155        CONCAT                                           ~96     ~95, !9
   74   156        CONCAT                                           ~97     ~96, !10
   75   157        CONCAT                                           ~98     ~97, !11
   76   158        CONCAT                                           ~99     ~98, !12
   77   159        CONCAT                                           ~100    ~99, !13
   78   160        CONCAT                                           ~101    ~100, !14
   79   161        CONCAT                                           ~102    ~101, !15
   80   162        CONCAT                                           ~103    ~102, !16
   81   163        CONCAT                                           ~104    ~103, !17
   82   164        CONCAT                                           ~105    ~104, !18
   83   165        CONCAT                                           ~106    ~105, !19
   84   166        CONCAT                                           ~107    ~106, !20
   63   167        ASSIGN                                                   !21, ~107
   87   168        INIT_FCALL                                               'sha1'
        169        SEND_VAR                                                 !21
        170        DO_ICALL                                         $109    
        171        ASSIGN                                                   !22, $109
   93   172        CONCAT                                           ~111    '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22Shift_JIS%22%3F%3E%3Csps-api-request+id%3D%22ST01-00101-101%22%3E%3Cmerchant_id%3E', !0
        173        CONCAT                                           ~112    ~111, '%3C%2Fmerchant_id%3E'
   94   174        CONCAT                                           ~113    ~112, '%3Cservice_id%3E'
        175        CONCAT                                           ~114    ~113, !1
        176        CONCAT                                           ~115    ~114, '%3C%2Fservice_id%3E'
   95   177        CONCAT                                           ~116    ~115, '%3Ccust_code%3E'
        178        CONCAT                                           ~117    ~116, !2
        179        CONCAT                                           ~118    ~117, '%3C%2Fcust_code%3E'
   96   180        CONCAT                                           ~119    ~118, '%3Corder_id%3E'
        181        CONCAT                                           ~120    ~119, !3
        182        CONCAT                                           ~121    ~120, '%3C%2Forder_id%3E'
   97   183        CONCAT                                           ~122    ~121, '%3Citem_id%3E'
        184        CONCAT                                           ~123    ~122, !4
        185        CONCAT                                           ~124    ~123, '%3C%2Fitem_id%3E'
   98   186        CONCAT                                           ~125    ~124, '%3Citem_name%3E'
        187        INIT_FCALL                                               'base64_encode'
        188        SEND_VAR                                                 !5
        189        DO_ICALL                                         $126    
        190        CONCAT                                           ~127    ~125, $126
        191        CONCAT                                           ~128    ~127, '%3C%2Fitem_name%3E'
   99   192        CONCAT                                           ~129    ~128, '%3Ctax%3E'
        193        CONCAT                                           ~130    ~129, !6
        194        CONCAT                                           ~131    ~130, '%3C%2Ftax%3E'
  100   195        CONCAT                                           ~132    ~131, '%3Camount%3E'
        196        CONCAT                                           ~133    ~132, !7
        197        CONCAT                                           ~134    ~133, '%3C%2Famount%3E'
  101   198        CONCAT                                           ~135    ~134, '%3Cfree1%3E'
        199        INIT_FCALL                                               'base64_encode'
        200        SEND_VAR                                                 !8
        201        DO_ICALL                                         $136    
        202        CONCAT                                           ~137    ~135, $136
        203        CONCAT                                           ~138    ~137, '%3C%2Ffree1%3E'
  102   204        CONCAT                                           ~139    ~138, '%3Cfree2%3E'
        205        INIT_FCALL                                               'base64_encode'
        206        SEND_VAR                                                 !9
        207        DO_ICALL                                         $140    
        208        CONCAT                                           ~141    ~139, $140
        209        CONCAT                                           ~142    ~141, '%3C%2Ffree2%3E'
  103   210        CONCAT                                           ~143    ~142, '%3Cfree3%3E'
        211        INIT_FCALL                                               'base64_encode'
        212        SEND_VAR                                                 !10
        213        DO_ICALL                                         $144    
        214        CONCAT                                           ~145    ~143, $144
        215        CONCAT                                           ~146    ~145, '%3C%2Ffree3%3E'
  104   216        CONCAT                                           ~147    ~146, '%3Corder_rowno%3E'
        217        CONCAT                                           ~148    ~147, !11
        218        CONCAT                                           ~149    ~148, '%3C%2Forder_rowno%3E'
  105   219        CONCAT                                           ~150    ~149, '%3Csps_cust_info_return_flg%3E'
        220        CONCAT                                           ~151    ~150, !12
        221        CONCAT                                           ~152    ~151, '%3C%2Fsps_cust_info_return_flg%3E'
  106   222        CONCAT                                           ~153    ~152, '%3Cdtls%3E'
  107   223        CONCAT                                           ~154    ~153, '%3C%2Fdtls%3E'
  108   224        CONCAT                                           ~155    ~154, '%3Cpay_method_info%3E'
  109   225        CONCAT                                           ~156    ~155, '%3Ccc_number%3E'
        226        CONCAT                                           ~157    ~156, !13
        227        CONCAT                                           ~158    ~157, '%3C%2Fcc_number%3E'
  110   228        CONCAT                                           ~159    ~158, '%3Ccc_expiration%3E'
        229        CONCAT                                           ~160    ~159, !14
        230        CONCAT                                           ~161    ~160, '%3C%2Fcc_expiration%3E'
  111   231        CONCAT                                           ~162    ~161, '%3Csecurity_code%3E'
        232        CONCAT                                           ~163    ~162, !15
        233        CONCAT                                           ~164    ~163, '%3C%2Fsecurity_code%3E'
  112   234        CONCAT                                           ~165    ~164, '%3Ccust_manage_flg%3E'
        235        CONCAT                                           ~166    ~165, !16
        236        CONCAT                                           ~167    ~166, '%3C%2Fcust_manage_flg%3E'
  113   237        CONCAT                                           ~168    ~167, '%3C%2Fpay_method_info%3E'
  114   238        CONCAT                                           ~169    ~168, '%3Cpay_option_manage%3E'
  115   239        CONCAT                                           ~170    ~169, '%3C%2Fpay_option_manage%3E'
  116   240        CONCAT                                           ~171    ~170, '%3Cencrypted_flg%3E'
        241        CONCAT                                           ~172    ~171, !17
        242        CONCAT                                           ~173    ~172, '%3C%2Fencrypted_flg%3E'
  117   243        CONCAT                                           ~174    ~173, '%3Crequest_date%3E'
        244        CONCAT                                           ~175    ~174, !18
        245        CONCAT                                           ~176    ~175, '%3C%2Frequest_date%3E'
  118   246        CONCAT                                           ~177    ~176, '%3Climit_second%3E'
        247        CONCAT                                           ~178    ~177, !19
        248        CONCAT                                           ~179    ~178, '%3C%2Flimit_second%3E'
  119   249        CONCAT                                           ~180    ~179, '%3Csps_hashcode%3E'
        250        CONCAT                                           ~181    ~180, !22
        251        CONCAT                                           ~182    ~181, '%3C%2Fsps_hashcode%3E'
  120   252        CONCAT                                           ~183    ~182, '%3C%2Fsps-api-request%3E'
   90   253        ASSIGN                                                   !23, ~183
  124   254        ASSIGN                                                   !24, 'https%3A%2F%2Fstbfep.sps-system.com%2Fapi%2Fxmlapi.do'
  127   255        CONCAT                                           ~186    !24, '%3Cbr%2F%3E'
        256        ECHO                                                     ~186
  128   257        CONCAT                                           ~187    !0, !1
        258        CONCAT                                           ~188    ~187, '+-+'
        259        CONCAT                                           ~189    ~188, !20
        260        CONCAT                                           ~190    ~189, '%3Cbr%2F%3E'
        261        ECHO                                                     ~190
  130   262        CONCAT                                           ~191    !23, '%3Cbr%2F%3E'
        263        ECHO                                                     ~191
  136   264      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.23 ms | 1425 KiB | 19 Q