PR

【9/29】ゲソてんAPI #4278

wada opened this at 2025-09-22T11:47:13; closed

Description

opened by wada at 2025-09-22T11:47:13; updated 2025-10-01T14:30:33

概要

新規テーブル

CREATE TABLE `log_gesoten_payment` (
  `payment_id` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' COMMENT '決済ID',
  `user_no` int(11) NOT NULL COMMENT 'ユーザ管理番号',
  `type` int(11) NOT NULL COMMENT '1:酒場雇用、3:アイテム、4:ガチャ1枚、5:ガチャ10枚',
  `item_id` int(11) NOT NULL COMMENT 'アイテム管理番号',
  `item_json` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT 'json構造',
  `amount` int(11) NOT NULL COMMENT '個数',
  `unit_price` int(11) NOT NULL COMMENT '値段',
  `result_flg` tinyint(4) NOT NULL DEFAULT '0' COMMENT '決済完了ステータス',
  `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '登録日時',
  PRIMARY KEY (`payment_id`),
  KEY `user_no` (`user_no`),
  KEY `reg_date` (`reg_date`),
  KEY `result_flg` (`result_flg`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE user_platform ADD `platform_id` int(10) unsigned NOT NULL DEFAULT '0';
ALTER TABLE user_platform ADD `media_id` int(10) unsigned NOT NULL DEFAULT '0';

テスト方法、確認した内容

TODO

Comment

#42498 by kouho at 2025-09-26T12:51:30; updated 2025-09-26T12:51:30

@wada
以下確認をお願いいたします。sessionについては問題なく可能であれば...

■ yamada.kaizoku-jolly.com → gesoten.kaizoku-jolly.comに修正

・define_gesoten.inc
$_df['HOST_SERVER'] = "{$request_scheme}://gesoten.kaizoku-jolly.com";

・platform_gesoten.js
define_server = 'http://gesoten.kaizoku-jolly.com';
define_host_server_island = 'http://gesoten.kaizoku-jolly.com/';

■ sessionの扱いをyamadaと同レベルに

・GesotenPlatformService
function authenticate()

session_start();

ini_set('session.sid_length', 64);
ini_set('session.sid_bits_per_character', 6);
ini_set('session.gc_maxlifetime', 3600);

session_name($this->session_name);
session_set_cookie_params([
'lifetime' => 86400,
'httponly' => true,
'samesite' => 'None', // iframe で必要なら 'None'; そうでなければ 'Strict'
]);

function authenticate_redirect)0

unset($_SESSION['gs_request_token']);
session_regenerate_id(true);
...
session_write_close();

kouho add_label at 2025-09-26T12:51:41: コメントあり

Comment

#42525 by wada at 2025-09-28T09:32:01; updated 2025-09-28T09:32:01

@kouho
本番設定用PRを作成し設定します。

> ■ yamada.kaizoku-jolly.com → gesoten.kaizoku-jolly.comに修正

'samesite' => 'None'に変更しました。
session_write_close()は別途対応が必要なため別PRとして対応します。

> ■ sessionの扱いをyamadaと同レベルに

kouho add_label at 2025-09-29T08:42:30: 皇甫 LGTM

Comment

#42529 by kouho at 2025-09-29T08:42:37; updated 2025-09-29T08:42:37

@wada
確認OKです

wada refer at 2025-09-29T10:59:47: 4288:【9/29 14:00】ゲソてん関連更新
wada close_comment at 2025-09-29T14:12:01: 別PRでマージ済み
wada refer at 2025-10-01T14:30:33: 4290:【10/3】define_gesoten本番設定

Commit range

based694432281eb0e8947bbaf4b688f14326347bdec
head160d291462512855fbec8c36f6a0a69b68021d8c
base branchjolly/jr-web:master
head branchjolly/jr-web:gstn_api

View commits

Commit details are loaded from Git when a dynamic archive server is running, or can be embedded with --include-commits.
Files changed86 filesView patch
statusfile
modifiedlib/SubFunc.inc
addedlib/SubFunc/SubFunc_gesoten.inc
modifiedlib/SubFunc/SubFunc_platform.inc
modifiedlib/SubFunc/SubFunc_yamada.inc
modifiedlib/ajax/friend_detail.inc
modifiedlib/ajax/shop_payment.inc
modifiedlib/ajax/shop_select.inc
addedlib/class/platform/gesoten/GesotenAPI.class.php
addedlib/class/platform/gesoten/GesotenPlatformService.class.php
addedlib/class/platform/gesoten/GesotenWithoutAPI.class.php
modifiedlib/class/platform/yamada/YamadaWithoutAPI.class.php
modifiedlib/conf/define.inc
addedlib/conf/define_gesoten.inc
modifiedlib/dGameOAuth.php
modifiedlib/models/Gacha_payment.php
addedlib/models/Gacha_payment_gesoten.php
addedlib/models/Shop_payment_gesoten.php
addedlib/models/dao/log_gesoten_payment.php
modifiedlib/models/shop/Base_item.php
addedlib/public/APIDebug-Gesoten.inc
modifiedlib/public/Bar-GachaCheck.inc
modifiedlib/public/Bar-GachaExec.inc
modifiedlib/public/Bar-ItemGachaCheck.inc
modifiedlib/public/Bar-ItemGachaExec.inc
modifiedlib/public/Bar-MonsterGachaCheck.inc
modifiedlib/public/Bar-MonsterGachaExec.inc
modifiedlib/public/Bar-PickupGachaCheck.inc
modifiedlib/public/Bar-PickupGachaExec.inc
modifiedlib/public/Bar-PointGachaCheck.inc
modifiedlib/public/Bar-PointGachaExec.inc
modifiedlib/public/Bar-SPGachaCheck.inc
modifiedlib/public/Bar-SPGachaExec.inc
modifiedlib/public/Bar-SelectCheck.inc
modifiedlib/public/Bar-SelectCoinResult.inc
modifiedlib/public/Bar-SetupGachaCheck.inc
modifiedlib/public/Bar-SetupGachaExec.inc
modifiedlib/public/Debug.inc
addedlib/public/GesotenLp.inc
modifiedpublic_html/index.php
addedpublic_html/item_buy_response_gesoten.php
addedpublic_html/item_check_response_gesoten.php
modifiedpublic_html/js/JOLLYROGER.js
modifiedpublic_html/js/autoload_platform_js.php
addedpublic_html/js/platform_gesoten.js
addedpublic_html/sandbox_gesoten_gadget.xml
addedpublic_html/template/APIDebug-Gesoten.tpl
modifiedpublic_html/template/Bar-DrinkItemGacha.tpl
modifiedpublic_html/template/Bar-Gacha.tpl
modifiedpublic_html/template/Bar-GachaCheck.tpl
modifiedpublic_html/template/Bar-GachaCheckReprint2.tpl
modifiedpublic_html/template/Bar-GachaCheckReprint3.tpl
modifiedpublic_html/template/Bar-GachaReprint2.tpl
modifiedpublic_html/template/Bar-GachaReprint3.tpl
modifiedpublic_html/template/Bar-GachaRevival.tpl
modifiedpublic_html/template/Bar-Gacha_old.tpl
modifiedpublic_html/template/Bar-ItemGachaCheck.tpl
modifiedpublic_html/template/Bar-ItemGachaResult.tpl
modifiedpublic_html/template/Bar-MonsterGachaCheck.tpl
modifiedpublic_html/template/Bar-MonsterGacha_Default.tpl
modifiedpublic_html/template/Bar-PickupGacha.tpl
modifiedpublic_html/template/Bar-PickupGachaCheck.tpl
modifiedpublic_html/template/Bar-PickupGachaResult.tpl
modifiedpublic_html/template/Bar-PickupGachaSP.tpl
modifiedpublic_html/template/Bar-PointGacha.tpl
modifiedpublic_html/template/Bar-PointGachaCheck.tpl
modifiedpublic_html/template/Bar-PointGachaResult.tpl
modifiedpublic_html/template/Bar-SPGachaCheck.tpl
modifiedpublic_html/template/Bar-SPGachaYamada.tpl
modifiedpublic_html/template/Bar-SelectCheck.tpl
modifiedpublic_html/template/Bar-SetupGacha.tpl
modifiedpublic_html/template/Bar-SetupGachaCheck.tpl
modifiedpublic_html/template/Bar-SetupGachaResult.tpl
modifiedpublic_html/template/Friend.tpl
addedpublic_html/template/GesotenLp.tpl
addedpublic_html/template/Gesoten__Error.tpl
modifiedpublic_html/template/Shop-Assortment.tpl
modifiedpublic_html/template/Shop-BoxSet.tpl
modifiedpublic_html/template/Shop-BoxSetCheck.tpl
modifiedpublic_html/template/Shop-CardHolderPack.tpl
modifiedpublic_html/template/Shop-GainSet.tpl
modifiedpublic_html/template/Shop-GoldSet.tpl
modifiedpublic_html/template/Shop-PurchaseLoginBonus.tpl
modifiedpublic_html/template/Shop-StarterPack.tpl
modifiedpublic_html/template/Shop-TrainingPack.tpl
modifiedpublic_html/template/Shop.tpl
modifiedpublic_html/template/header_sp.tpl
Patch body is stored as a separate file to keep this page lightweight.