21 lines
576 B
PHP
21 lines
576 B
PHP
|
<?php
|
||
|
|
||
|
namespace app\common\logic;
|
||
|
|
||
|
use Symfony\Component\HttpClient\HttpClient;
|
||
|
|
||
|
class PayRequestLogic extends BaseLogic
|
||
|
{
|
||
|
public static function getPrePayId($param)
|
||
|
{
|
||
|
try {
|
||
|
$requestResponse = HttpClient::create()->request('POST', env('url.pay_prefix'). '/api/wechat_pay_service_merchant_pay/appPrePay', [
|
||
|
'body' => $param
|
||
|
]);
|
||
|
return json_decode($requestResponse->getContent(), true);
|
||
|
} catch (Exception $e) {
|
||
|
self::setError($e->getMessage());
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|