weizong song 1 year ago
parent f2d1d31858
commit 9f9fbcdcdc

@ -95,17 +95,18 @@ class Refund extends SoftDeletesModel
*/
public function weixinRefund()
{
$order = $this->order;
$url = "https://api.mch.weixin.qq.com/secapi/pay/refund";
$CommonUtilPub = new \CommonUtilPub();
$WxPayConfPub = new \WxPayConfPub();
$CommonUtilPub = new \CommonUtilPub($order->project_id);
$WxPayConfPub = new \WxPayConfPub($order->project_id);
$inputObj = [];
$inputObj["transaction_id"] = $this->relatedRecharge->payment_serial;
$inputObj["out_refund_no"] = $this->serial;
$inputObj["total_fee"] = $this->relatedRecharge->money * 100;
$inputObj["refund_fee"] = $this->money * 100;
$inputObj["nonce_str"] = $CommonUtilPub->createNoncestr();
$inputObj["appid"] = $WxPayConfPub::APPID;
$inputObj["mch_id"] = $WxPayConfPub::MCHID;
$inputObj["appid"] = $WxPayConfPub::$APPID;
$inputObj["mch_id"] = $WxPayConfPub::$MCHID;
$inputObj["sign"] = $CommonUtilPub->getSign($inputObj);
$xml = $CommonUtilPub->arrayToXml($inputObj);

Loading…
Cancel
Save