Sfoglia il codice sorgente

php reference for RPN, they are very strict about parameter ordering

tags/v0.5
patrick 5 anni fa
parent
commit
8179ab36a9
1 ha cambiato i file con 43 aggiunte e 0 eliminazioni
  1. +43
    -0
      ref/r.php

+ 43
- 0
ref/r.php Vedi File

@@ -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>

Loading…
Annulla
Salva