fly 5 年 前
コミット
dfa711fb0b
1 ファイル変更6 行追加5 行削除
  1. 6 5
      app/Libs/Pay/Merchants/Official.php

+ 6 - 5
app/Libs/Pay/Merchants/Official.php

@@ -80,12 +80,13 @@ class Official implements PayMerchantInterface
                 case 'APP':
                     $data = [
                         'appId' => $result->appid,
-                        'mch_id' => $result->mch_id,
-                        'prepay_id' => $result->prepay_id,
-                        'nonce_str' => $result->nonce_str,
-                        'sign' => $result->sign,
-                        'trade_type' => $result->trade_type,
+                        'partnerid' => $result->mch_id,
+                        'prepayid' => $result->prepay_id,
+                        'package' => "Sign=WXPay",
+                        'noncestr' => $result->nonce_str,
+                        'timestamp' => time(),
                     ];
+                    $data['sign'] = $this->makeSign($data);
                     break;
                 case 'MWEB':
                     $data = [