亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

無法使用參考代碼 [xxx] 處理訂單,PayU Laravel

無法使用參考代碼 [xxx] 處理訂單,PayU Laravel

PHP
MYYA 2023-07-21 16:27:43
我正在嘗試獲取 payu webcheckout 實現的簽名我認為錯誤出現在簽名字段中,我在控制器中定義了 api 密鑰<form method="post" action="https://sandbox.checkout.payulatam.com/ppp-web-gateway-payu/">  <input name="merchantId" type="text" value="508029">  <input name="accountId" type="text" value="512321">  <input name="description" type="text" value="{{ $plans->description }}">  <input name="referenceCode" type="text" value="{{ $plans->id }}">  <input name="amount" type="text" value="{{ $plans->price }}">  <input name="tax" type="text" value="0">  <input name="taxReturnBase" type="text" value="0">  <input name="currency" type="text" value="COP">  <input name="signature" type="text" value="md5($apy_key." ~ "."508029 "."~ ".$plans->id."~ ".$plans->price."~ "."COP ")">  <input name="test" type="text" value="1">  <input name="buyerEmail" type="text" value="[email protected]">  <input name="responseUrl" type="text" value="https://poligonourbano.soluttolabs.com/">  <input name="confirmationUrl" type="text" value="http:// www.test.com/confirmation">  <input name="Submit" type="submit" value="Enviar"></form>控制器功能:public function planView() {  $apy_key = "4Vj8eK4rloUd272L48hsrarnUA";  $plans = Plan::findOrFail(2);  return view('plans', compact('plans', 'apy_key'));}
查看完整描述

1 回答

?
蝴蝶刀刀

TA貢獻1801條經驗 獲得超8個贊

問題確實出在您創建簽名的方式上

當你放入md5($apy_key."~"."508029"."~".$plans->id."~".$plans->price."~"."COP")它時"",它被視為一個字符串,你應該用 包裹 md5 {{ }}。

請嘗試在控制器中創建簽名并將其作為值傳遞給視圖,在視圖中處理任何邏輯不是最佳實踐。


查看完整回答
反對 回復 2023-07-21
  • 1 回答
  • 0 關注
  • 137 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號