This commit is contained in:
aozhiwei 2023-08-02 15:30:49 +08:00
parent ce13373ea2
commit 610fe1c4bd
2 changed files with 5 additions and 5 deletions

View File

@ -55,7 +55,7 @@ class InAppRecord extends BaseModel {
myself()->_getMysql($accountId), myself()->_getMysql($accountId),
't_inapp_record', 't_inapp_record',
array( array(
'account_id' => myself()->_getAccountId(), 'account_id' => $accountId,
'daytime' => myself()->_getNowDaySeconds() 'daytime' => myself()->_getNowDaySeconds()
), ),
array( array(
@ -68,7 +68,7 @@ class InAppRecord extends BaseModel {
'modifytime' => myself()->_getNowTime(), 'modifytime' => myself()->_getNowTime(),
), ),
array( array(
'account_id' => myself()->_getAccountId(), 'account_id' => $accountId,
'amount_ok' => $amount, 'amount_ok' => $amount,
'buy_ok_times' => 1, 'buy_ok_times' => 1,
'daytime' => myself()->_getNowDaySeconds(), 'daytime' => myself()->_getNowDaySeconds(),

View File

@ -68,7 +68,6 @@ class InAppPurchase {
private function verifySign($data) private function verifySign($data)
{ {
return true;
$channel = $data['channel']; $channel = $data['channel'];
$records = $data['records']; $records = $data['records'];
$sign = $data['sign']; $sign = $data['sign'];
@ -126,17 +125,18 @@ class InAppPurchase {
$itemId = $goodsMeta['item_id']; $itemId = $goodsMeta['item_id'];
$itemNum = $goodsMeta['item_num']; $itemNum = $goodsMeta['item_num'];
if ($itemId == V_ITEM_DIAMOND) { if ($itemId == V_ITEM_DIAMOND) {
InAppRecord::addAmount($orderDb['price']); InAppRecord::addAmountOk($orderDb['account_id'], $orderDb['price']);
$event = [ $event = [
'name' => LogService::RECHARGE_DIAMOND, 'name' => LogService::RECHARGE_DIAMOND,
'val' => $itemNum 'val' => $itemNum
]; ];
error_log('InAppPurchase senditem ' . $itemId . ' ' . $itemNum);
LogService::productDiamondCallback(['account_id' => $orderDb['account_id']], $event); LogService::productDiamondCallback(['account_id' => $orderDb['account_id']], $event);
$addItemService = new ShopAddItemService(); $addItemService = new ShopAddItemService();
$addItemService->addItemByAccountId($orderDb['account_id'], $itemId, $itemNum); $addItemService->addItemByAccountId($orderDb['account_id'], $itemId, $itemNum);
myself()->_addLogEx($orderDb['account_id'], 'InAppPurchase', 'ok', myself()->_addLogEx($orderDb['account_id'], 'InAppPurchase', 'ok',
array( array(
$ordreDb['order_id'], $orderDb['order_id'],
json_encode($orderDb) json_encode($orderDb)
)); ));
} else { } else {