1
This commit is contained in:
parent
928b6f6615
commit
21dc8f1d57
@ -248,8 +248,7 @@ class ShopController extends BaseAuthedController {
|
||||
}
|
||||
if (!in_array($goodsMeta['shop_id'],
|
||||
array(
|
||||
mt\Shop::INAPP_SHOP_CEG,
|
||||
mt\Shop::INAPP_SHOP_DIAMOND
|
||||
mt\Shop::INAPP_SHOP_CEG
|
||||
)
|
||||
)) {
|
||||
$this->_rspErr(3, "inapp purchase failed");
|
||||
|
@ -43,7 +43,6 @@ class Shop {
|
||||
const WEEKLY_BUY_LIMIT = 2;
|
||||
const TOTAL_BUY_LIMIT = 3;
|
||||
|
||||
const INAPP_SHOP_CEG = 7;
|
||||
const INAPP_SHOP_DIAMOND = 9;
|
||||
|
||||
const OUTSIDE_SHOP = 100;
|
||||
|
@ -16,11 +16,28 @@ use models\ShopBuyRecord;
|
||||
|
||||
use services\LogService;
|
||||
|
||||
// {
|
||||
// channel: 'google',
|
||||
// sign: '123456677' // 签名字段
|
||||
// records: [{
|
||||
// productId: '2999', // 从google play console获取的product id
|
||||
// gameOrderId: '1231321312', // 开始支付时, 从游戏相关服务那获得的订单id
|
||||
// orderId: 'GPA.3355-1172-9416-16839', // 从google develope API 获取的订单id
|
||||
// status: 9, // 订单状态, 上报的订单状态一般只有2种情况, 9: 支付成功, 96: 用户退款
|
||||
// }]
|
||||
// }
|
||||
// let reportData: any = {
|
||||
// channel: 'google',
|
||||
// records,
|
||||
// }
|
||||
// const hashSort = ''
|
||||
// const signStr = 'channel=google&' + records.map(record =>Object.keys(record).sort().map(key => `${key}=${record[key]}`).join('&')).join('&')
|
||||
|
||||
class InAppPurchase {
|
||||
|
||||
public function process()
|
||||
{
|
||||
error_log('ShopInappPurchaseDiamonds:' . json_encode($_REQUEST, JSON_PRETTY_PRINT));
|
||||
error_log('ShopInappPurchaseDiamonds:' . json_encode($_REQUEST));
|
||||
error_log('----- inappPurchaseDiamonds -----');
|
||||
$body = json_decode(file_get_contents('php://input'), true);
|
||||
error_log('body:' . json_encode($body));
|
||||
@ -28,23 +45,6 @@ class InAppPurchase {
|
||||
$records = $body['records'];
|
||||
$sign = $body['sign'];
|
||||
|
||||
// {
|
||||
// channel: 'google',
|
||||
// sign: '123456677' // 签名字段
|
||||
// records: [{
|
||||
// productId: '2999', // 从google play console获取的product id
|
||||
// gameOrderId: '1231321312', // 开始支付时, 从游戏相关服务那获得的订单id
|
||||
// orderId: 'GPA.3355-1172-9416-16839', // 从google develope API 获取的订单id
|
||||
// status: 9, // 订单状态, 上报的订单状态一般只有2种情况, 9: 支付成功, 96: 用户退款
|
||||
// }]
|
||||
// }
|
||||
// let reportData: any = {
|
||||
// channel: 'google',
|
||||
// records,
|
||||
// }
|
||||
// const hashSort = ''
|
||||
// const signStr = 'channel=google&' + records.map(record =>Object.keys(record).sort().map(key => `${key}=${record[key]}`).join('&')).join('&')
|
||||
|
||||
// const sign = hmacsha256(signStr, hashSort)
|
||||
|
||||
// 定义一个空数组,用来存放每个记录的键值对字符串
|
||||
|
Loading…
x
Reference in New Issue
Block a user