//this is how payumoney payment gateway is implemented in cakephp3
$MERCHANT_KEY = "merhcant key"; //merchant key provided by payumoney
$SALT = "salt"; //salt provided by payumoney
$PAYU_BASE_URL = "test.payu.in";
$txnid = '';
if (empty($txnid)) {
$txnid = substr(hash('sha256', mt_rand() . microtime()), 0, 20); // Generate random transaction id
}
$hash = '';
$firstname = $sessionUserInfo['first_name'];
$email = $sessionUserInfo['email'];
$contact_no = $sessionUserInfo['contact_no'];
$hashSequence = ($MERCHANT_KEY . "|" . $txnid . "|" . $totalAmount . "|" . $productInfo . "|" . $firstname . "|" . $email . "|||||||||||" . $SALT);
$hash = strtolower(hash("sha512", $hashSequence));//hash Sequence generation formula
$this->set(compact('PAYU_BASE_URL', 'MERCHANT_KEY', 'SALT', 'PAYU_BASE_URL', 'txnid', 'hash', 'productInfo', 'totalAmount'));//write above code in your controller
<form action="<?php echo $PAYU_BASE_URL; ?>/_payment" method="post" name="payuForm">
<?php echo $this->Form->hidden('key', ['name' => 'key', 'value' => $MERCHANT_KEY]); ?>
<?php echo $this->Form->hidden('hash', ['name' => 'hash', 'value' => $hash]); ?>
<?php echo $this->Form->hidden('txnid', ['name' => 'txnid', 'value' => $txnid]); ?>
<?php echo $this->Form->hidden('amount', ['name' => 'amount', 'value' => $totalAmount]); ?>
<?php echo $this->Form->hidden('firstname', ['name' => 'firstname', 'value' => $authUser['first_name']]); ?>
<?php echo $this->Form->hidden('address', ['name' => 'address', 'value' => $authUser['address']]); ?>
<?php echo $this->Form->hidden('email', ['name' => 'email', 'value' => $authUser['email']]); ?>
<?php echo $this->Form->hidden('phone', ['name' => 'phone', 'value' => $authUser['contact_no']]); ?>
<?php echo $this->Form->hidden('productinfo', ['name' => 'productinfo', 'value' => $productInfo]); ?>
<?php echo $this->Form->hidden('surl', ['name' => 'surl', 'value' => SITE_PATH . "Payments/successPayment/"]); ?>
<?php echo $this->Form->hidden('furl', ['name' => 'furl', 'value' => SITE_PATH . "Payments/failUrl/"]); ?>
<?php echo $this->Form->button('Order', array('type' => 'submit', 'class' => 'btn btn-default btn-md round fa fa-arrow-circle-right ml-5', 'name' => 'submit')); ?>
</form>//write above code in your ctp file
私はこのデータが「そのまま」というわけではないと思います。これを準備したコードの一部と、それを送信する方法を表示できませんか? – OldPadawan
私はあなたがサービスのプロバイダに尋ねるべきではないかと考えています。 – DanFromGermany
説明付きの詳細なブログ:http://sforsuresh.in/payumoney-php-payment-gateway-integration/ –