test
This commit is contained in:
parent
d913526c05
commit
668edde221
@ -44,6 +44,7 @@ use App\Models\MEarningTransfers;
|
|||||||
use App\Models\MerchantUsers;
|
use App\Models\MerchantUsers;
|
||||||
use App\Models\ServerQuestion;
|
use App\Models\ServerQuestion;
|
||||||
use Intervention\Image\ImageManagerStatic as Image;
|
use Intervention\Image\ImageManagerStatic as Image;
|
||||||
|
use Symfony\Component\Cache\Traits\FilesystemCommonTrait;
|
||||||
|
|
||||||
class WechatController extends Controller
|
class WechatController extends Controller
|
||||||
{
|
{
|
||||||
@ -292,7 +293,8 @@ class WechatController extends Controller
|
|||||||
$this->sendMessage($fromUsername, 'text', $data);
|
$this->sendMessage($fromUsername, 'text', $data);
|
||||||
} elseif ($message["Event"] && $message["Event"] == "xpay_goods_deliver_notify") {// 道具发货推送
|
} elseif ($message["Event"] && $message["Event"] == "xpay_goods_deliver_notify") {// 道具发货推送
|
||||||
if (isset($message["WeChatPayInfo"])) { // 支付成功
|
if (isset($message["WeChatPayInfo"])) { // 支付成功
|
||||||
|
// 订单发货
|
||||||
|
$this->xpay_goods_deliver_notify($message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif ($msgType == 'text' || $msgType == 'miniprogrampage') {//文本消息
|
} elseif ($msgType == 'text' || $msgType == 'miniprogrampage') {//文本消息
|
||||||
@ -310,6 +312,22 @@ class WechatController extends Controller
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function xpay_goods_deliver_notify($message)
|
||||||
|
{
|
||||||
|
$url = config("app.url") . "/go/api/order/callback/virtual";
|
||||||
|
$arr = [
|
||||||
|
"user_id" => $message["OutTradeNo"],
|
||||||
|
"productId" => $message["GoodsInfo"]["ProductId"],
|
||||||
|
"quantity" => $message["GoodsInfo"]["Quantity"],
|
||||||
|
"goodsPrice" => $message["GoodsInfo"]["ActualPrice"],
|
||||||
|
"token" => "uftx_xpay_goods_deliver_notify",
|
||||||
|
];
|
||||||
|
$client = new Client();
|
||||||
|
$client->post($url, [
|
||||||
|
'json' => $arr,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
public function getResponse($message)
|
public function getResponse($message)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user