PayuMoney Вернуть недействительную транзакцию. Пожалуйста, попробуйте снова в функции успеха
Я интегрирую PayuMoney на laravel 5.5. Успешное выполнение платежа на панели инструментов Payumoeny, но при успешном выполнении функции возвращает "PayuMomeny Return Invalid Transaction. Пожалуйста, повторите попытку".
функция успеха
public function payumoneyPaymentSuccess(Request $request)
{
$status = $request->status;
$firstname = $request->firstname;
$amount = $request->amount;
$txnid = $request->txnid;
$posted_hash = $request->hash;
$key = $request->key;
$productinfo = $request->productinfo;
$email = $request->email;
/*get salt*/
$payumoneySetting = parent::getPaymentSetting();
$payumoney = json_decode($payumoneySetting['PayUMoney'],true);
$MERCHANT_KEY = $payumoney['Merchant_Key'];
$SALT = $payumoney['Merchant_Salt'];
$salt = $SALT;
//salt value is correct here
// Salt should be same Post Request
If (isset($_POST["additionalCharges"])) {
$additionalCharges=$_POST["additionalCharges"];
$retHashSeq = $additionalCharges.'|'.$salt.'|'.$status.'|||||||||||'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;
} else {
$retHashSeq = $salt.'|'.$status.'|||||||||||'.$email.'|'.$firstname.'|'.$productinfo.'|'.$amount.'|'.$txnid.'|'.$key;
}
$hash = hash("sha512", $retHashSeq);
if ($hash != $posted_hash) {
echo "Invalid Transaction. Please try again";
} else {
echo "<h3>Thank You. Your order status is ". $status .".</h3>";
echo "<h4>Your Transaction ID for this transaction is ".$txnid.".</h4>";
echo "<h4>We have received a payment of Rs. " . $amount . ". Your order will soon be shipped.</h4>";
}
}