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

View File

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