From a79a11762e1c1a1a1e6a574af0effb27c181ae97 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 2 Aug 2023 16:18:09 +0800 Subject: [PATCH] 1 --- webapp/controller/ShopController.class.php | 2 +- webapp/services/callback/OutAppPurchase.php | 34 ++++++++++----------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 437e5323..ec10ea65 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -213,7 +213,7 @@ class ShopController extends BaseAuthedController { $orderId = OrderId::gen(); $params = array( - +network, crypto, address, fiat, fiatAmount, payWayCode, country, accountId, orderId ); } diff --git a/webapp/services/callback/OutAppPurchase.php b/webapp/services/callback/OutAppPurchase.php index ea6f0c94..c2670bbf 100644 --- a/webapp/services/callback/OutAppPurchase.php +++ b/webapp/services/callback/OutAppPurchase.php @@ -18,24 +18,22 @@ use models\OutAppOrder; use services\LogService; -/* - // let repdata = { - // account_id: string - // order_id: string - // status: string - // id: string - // txhash: string - // } - // 我返回给你这些数据和一个sign字段, - // sign使用上面 repdata 按key 顺序排后, 组成key1=val1&key2=val2后, 使用hmac_sha256 hash, key是 - // PENDING = 0, // 初始状态 - // TRANSFERING = 1, //只有国库模式才会有该状态 - // TRANSFERED = 2, //只有国库模式才会有该状态 - // SUCCESS = 9, // 成功的最终状态 - // TRANSFER_FAIL = 98, // 转账错误 - // FAIL = 99, // 也是错误 - // -*/ +// let repdata = { +// account_id: string +// order_id: string +// status: string +// id: string +// txhash: string +// } +// 我返回给你这些数据和一个sign字段, +// sign使用上面 repdata 按key 顺序排后, 组成key1=val1&key2=val2后, 使用hmac_sha256 hash, key是 +// PENDING = 0, // 初始状态 +// TRANSFERING = 1, //只有国库模式才会有该状态 +// TRANSFERED = 2, //只有国库模式才会有该状态 +// SUCCESS = 9, // 成功的最终状态 +// TRANSFER_FAIL = 98, // 转账错误 +// FAIL = 99, // 也是错误 +// class OutAppPurchase {