true, 'currency' => $currencyCode, 'amount_minor' => $amountMinor, ], $req); } public function creditMainForLotteryWithdraw( Player $player, string $currencyCode, int $amountMinor, string $idempotentKey, ): MainSiteWalletResult { $req = self::requestSnapshot($player, $currencyCode, $amountMinor, $idempotentKey, 'stub_credit'); return MainSiteWalletResult::success('stub-credit:'.$idempotentKey, [ 'stub' => true, 'currency' => $currencyCode, 'amount_minor' => $amountMinor, ], $req); } public function refundMainForFailedLotteryDeposit( Player $player, string $currencyCode, int $amountMinor, string $idempotentKey, ): MainSiteWalletResult { $req = self::requestSnapshot($player, $currencyCode, $amountMinor, $idempotentKey, 'stub_refund'); return MainSiteWalletResult::success('stub-refund:'.$idempotentKey, [ 'stub' => true, 'currency' => $currencyCode, 'amount_minor' => $amountMinor, ], $req); } /** * @return array */ private static function requestSnapshot( Player $player, string $currencyCode, int $amountMinor, string $idempotentKey, string $stubOp, ): array { return [ 'site_code' => $player->site_code, 'site_player_id' => $player->site_player_id, 'player_id' => $player->id, 'currency_code' => $currencyCode, 'amount_minor' => $amountMinor, 'idempotent_key' => $idempotentKey, '_meta' => [ 'stub' => true, 'operation' => $stubOp, ], ]; } }