| @@ -0,0 +1,43 @@ | |||
| <?php | |||
| $data = array( | |||
| 'version'=>'1.1', | |||
| 'sign_type'=> 'MD5', | |||
| 'mid' => 'mid', //must to use your mid | |||
| 'notify_url' => 'http://127.0.0.1/RPNPROJECT/notify.php', | |||
| 'order_id' => "demo-" . date('YmdHis'), | |||
| 'order_amount' => round($_POST['amount']*100), | |||
| 'order_time' => date('YmdHis'), | |||
| 'user_id'=>$_POST['user_id'], | |||
| 'user_name'=>urlencode($_POST['user_name']), | |||
| 'user_cardno'=>$_POST['user_cardno'], | |||
| ); | |||
| $params = array(); | |||
| foreach ($data as $field => $value) { | |||
| if( $value == '' ) continue; | |||
| $params[] = "$field=$value"; | |||
| } | |||
| $params[] = "key=key"; //must to use your key | |||
| $data['signature'] = md5(implode('|', $params)); | |||
| ?> | |||
| <html> | |||
| <head> | |||
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |||
| </head> | |||
| <body> | |||
| <form id="payment" name="payment" action="https://deposit.paylomo.net/pay.php?r=payEasy" method="POST"> | |||
| <?php | |||
| foreach ($data as $key => $val) { | |||
| echo '<input type="hidden" name="'.$key.'" value="'.$val.'" />'; | |||
| } | |||
| ?> | |||
| </form> | |||
| </body> | |||
| <script type="text/javascript"> | |||
| document.getElementById('payment').submit(); | |||
| </script> | |||
| </html> | |||