我添加了 razorpay測(cè)試版本并且付款流程有效,但是當(dāng)我嘗試驗(yàn)證時(shí)signature出現(xiàn)以下錯(cuò)誤注意:未定義索引:第 24 行 C:\Users\Amin\Documents\NetBeansProjects\OLX\payment\verify.php 中的 razorpay_order_id 您的付款失敗Razorpay 錯(cuò)誤:通過了無效的簽名我在這里遵循代碼結(jié)構(gòu)形式https://github.com/razorpay/razorpay-php-testapp并試圖實(shí)現(xiàn)https://razorpay.com/docs/payment-gateway/web-integration/hosted/#step-2 ---粘貼托管結(jié)帳選項(xiàng)。有人可以指出哪里出了問題。這是verify.phprequire('config.php');session_start();require('razorpay-php/Razorpay.php');use Razorpay\Api\Api;use Razorpay\Api\Errors\SignatureVerificationError;$success = true;$error = "Payment Failed";if (empty($_POST['razorpay_payment_id']) === false) { $api = new Api($keyId, $keySecret); try { // Please note that the razorpay order ID must // come from a trusted source (session here, but // could be database or something else) $attributes = array( 'razorpay_order_id' => $_SESSION['razorpay_order_id'], 'razorpay_payment_id' => $_POST['razorpay_payment_id'], 'razorpay_signature' => $_POST['razorpay_signature'] ); $api->utility->verifyPaymentSignature($attributes); } catch (SignatureVerificationError $e) { $success = false; $error = 'Razorpay Error : ' . $e->getMessage(); }}if ($success === true) { $html = "<p>Your payment was successful</p> <p>Payment ID: {$_POST['razorpay_payment_id']}</p>";} else { $html = "<p>Your payment failed</p> <p>{$error}</p>";}echo $html;如果表格發(fā)布詳細(xì)信息,請(qǐng)?jiān)诖颂?
1 回答

www說
TA貢獻(xiàn)1775條經(jīng)驗(yàn) 獲得超8個(gè)贊
我認(rèn)為此流程中不存在會(huì)話?;蛘咧赋鏊跁?huì)話中的存儲(chǔ)位置。
否則,使用與從回調(diào) URL 中獲取數(shù)據(jù)相同的方法。
你有沒有嘗試過
$attributes = array(
'razorpay_order_id' => $_POST['razorpay_order_id'],
'razorpay_payment_id' => $_POST['razorpay_payment_id'],
'razorpay_signature' => $_POST['razorpay_signature']
);
- 1 回答
- 0 關(guān)注
- 72 瀏覽
添加回答
舉報(bào)
0/150
提交
取消