|
|
@@ -827,10 +827,10 @@ class TestController extends BaseController
|
|
|
//交易查询 ssh 20231021
|
|
|
public function actionTradeQuery()
|
|
|
{
|
|
|
- $shopId = 10649;
|
|
|
+ $shopId = 763;
|
|
|
$shop = ShopClass::getById($shopId, true);
|
|
|
if (empty($shop)) {
|
|
|
- util::stop('没有找到门店23');
|
|
|
+ util::stop('没有找到门店,编号677230');
|
|
|
}
|
|
|
$merchantPrivateKeyPath = Yii::getAlias("@vendor/lakala") . '/production/api_private_key.pem';
|
|
|
$lklCertificatePath = Yii::getAlias("@vendor/lakala") . '/production/lkl-apigw-v1.cer';
|
|
|
@@ -844,13 +844,13 @@ class TestController extends BaseController
|
|
|
];
|
|
|
$laResource = new Lakala($params);
|
|
|
$queryParams = [
|
|
|
- //'orderSn' => 'CG28450538',
|
|
|
- 'tradeNo' => '66221647702289',
|
|
|
+ 'orderSn' => 'CG28416364',
|
|
|
+ //'tradeNo' => '66221061685504',
|
|
|
];
|
|
|
- $response = $laResource->query($queryParams, 1);
|
|
|
+ $response = $laResource->query($queryParams, 0);
|
|
|
echo "<pre>";
|
|
|
print_r($response);
|
|
|
- //util::stop();
|
|
|
+ util::stop();
|
|
|
if (isset($response['code']) && $response['code'] == 'BBS00000') {
|
|
|
$capitalType = dict::getDict('capitalType', 'xhPurchase', 'id');
|
|
|
$connection = Yii::$app->db;
|
|
|
@@ -874,8 +874,7 @@ class TestController extends BaseController
|
|
|
|
|
|
$attach = '';
|
|
|
$total_amount = $response['resp_data']['total_amount'] ?? 0;
|
|
|
- //$orderSn = $response['resp_data']['out_trade_no'] ?? 0;
|
|
|
- $orderSn = 'CG28450541';
|
|
|
+ $orderSn = $response['resp_data']['out_trade_no'] ?? 0;
|
|
|
$totalFee = $total_amount / 100;
|
|
|
$transactionId = $response['resp_data']['trade_no'] ?? 0;
|
|
|
payUtil::thirdPay($currentPayWay, $capitalType, $orderSn, $totalFee, $attach, $transactionId);
|