mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-03 11:09:27 +00:00
Fixed F2F error & aff salt bug
This commit is contained in:
@@ -266,7 +266,7 @@ class Helpers
|
||||
public static function getPriceTag($amount): string
|
||||
{
|
||||
$currentCurrency = session('currency');
|
||||
$standard = sysConfig('standard_currency');
|
||||
$standard = sysConfig('standard_currency', 'CNY');
|
||||
$currencyLib = array_column(config('common.currency'), 'symbol', 'code');
|
||||
if (! empty($currentCurrency) && isset($currencyLib[$currentCurrency]) && $currentCurrency !== $standard) {
|
||||
return $currencyLib[$currentCurrency].CurrencyExchange::convert($currentCurrency, $amount);
|
||||
|
||||
@@ -57,7 +57,7 @@ class F2Fpay extends Gateway
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($result['code'] === 10000 && $result['msg'] === 'Success') {
|
||||
if ($result['code'] === '10000' && $result['msg'] === 'Success') {
|
||||
if ($request->has('out_trade_no') && in_array($request->input('trade_status'), ['TRADE_FINISHED', 'TRADE_SUCCESS'])) {
|
||||
if ($this->paymentReceived($request->input('out_trade_no'))) {
|
||||
exit('success');
|
||||
|
||||
@@ -52,7 +52,7 @@ class UserService extends BaseService
|
||||
{
|
||||
$affSalt = sysConfig('aff_salt');
|
||||
if (isset($affSalt)) {
|
||||
$aff = (new Hashids($affSalt, 8))->encode(self::$user->id());
|
||||
$aff = (new Hashids($affSalt, 8))->encode(self::$user->id);
|
||||
} else {
|
||||
$aff = self::$user->id;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ if (! function_exists('filterEmoji')) {
|
||||
|
||||
// 获取系统设置
|
||||
if (! function_exists('sysConfig')) {
|
||||
function sysConfig($key = false, $default = null)
|
||||
function sysConfig(string $key = null, string $default = null)
|
||||
{
|
||||
return $key ? config('settings.'.$key, $default) : config('settings');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user