小程序用户注销错误修复、其他细节优化

feat/task1-c-wallet
gongfuxiang 2023-04-20 18:30:53 +08:00
parent 4a66fd49b0
commit c44acbe6b9
22 changed files with 173 additions and 172 deletions

View File

@ -295,7 +295,6 @@ return [
'all_title' => '全部',
'select_all_title' => '全選',
'reverse_select_title' => '反選',
'reverse_select_title' => '反選',
'reset_title' => '重置',
'confirm_title' => '確認',
'cancel_title' => '取消',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => '請選擇邊線顏色',
'view_media_fixed_margin_title' => '外邊距',
'view_media_fixed_margin_message' => '請輸入外邊距、最大100的數位',
'view_media_fixed_padding_title' => '邊距',
'view_media_fixed_padding_title' => '邊距',
'view_media_fixed_padding_message' => '請輸入內邊距、最大100的數位',
'view_media_fixed_mouse_hover_images_amplify_title' => '滑鼠懸停圖片上方放大',
'view_media_fixed_width_100_title' => '是否寬度100%',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'ganz',
'select_all_title' => 'Alle auswählen',
'reverse_select_title' => 'Auswahl umkehren',
'reverse_select_title' => 'Auswahl umkehren',
'reset_title' => 'Zurücksetzen',
'confirm_title' => 'bestätigen',
'cancel_title' => 'Abbrechen',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => 'Bitte wählen Sie eine Rahmenfarbe',
'view_media_fixed_margin_title' => 'Marge',
'view_media_fixed_margin_message' => 'Bitte geben Sie eine Zahl mit einem Außenrand von bis zu 100 ein',
'view_media_fixed_padding_title' => 'Marge',
'view_media_fixed_padding_title' => 'Polsterung',
'view_media_fixed_padding_message' => 'Bitte geben Sie eine Zahl mit einem Innenrand von bis zu 100 ein',
'view_media_fixed_mouse_hover_images_amplify_title' => 'Zum Vergrößern mit der Maus über das Bild',
'view_media_fixed_width_100_title' => 'Ob die Breite 100%ist',

View File

@ -2386,7 +2386,7 @@ return [
'view_media_fixed_margin_title' => 'Margin',
'view_media_fixed_margin_message' => 'Please enter a number with an outer margin of up to 100',
'view_media_fixed_padding_title' => 'Padding',
'view_media_fixed_padding_message' => 'Please enter a number with an inner margin of up to 100',
'view_media_fixed_padding_message' => 'Please enter a number with an inner padding of up to 100',
'view_media_fixed_mouse_hover_images_amplify_title' => 'Mouse over image to zoom in',
'view_media_fixed_width_100_title' => 'Width 100%',
'view_media_fixed_height_100_title' => 'Height 100%',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'Tous',
'select_all_title' => 'Tout sélectionner',
'reverse_select_title' => 'Contre - Sélection',
'reverse_select_title' => 'Contre - Sélection',
'reset_title' => 'Réinitialisation',
'confirm_title' => 'Confirmation',
'cancel_title' => 'Annulation',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => 'Veuillez sélectionner une couleur de bordure',
'view_media_fixed_margin_title' => 'Marge extérieure',
'view_media_fixed_margin_message' => 'Sil vous plaît entrer marge extérieure, un nombre de 100 max',
'view_media_fixed_padding_title' => 'Marge extérieure',
'view_media_fixed_padding_title' => 'Marge intérieure',
'view_media_fixed_padding_message' => 'Sil vous plaît entrer la marge intérieure, le nombre jusquà 100',
'view_media_fixed_mouse_hover_images_amplify_title' => 'Survoler la souris au - dessus de limage agrandir',
'view_media_fixed_width_100_title' => 'Largeur 100%',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'intero',
'select_all_title' => 'Seleziona tutto',
'reverse_select_title' => 'Selezione inversa',
'reverse_select_title' => 'Selezione inversa',
'reset_title' => 'Ripristina',
'confirm_title' => 'conferma',
'cancel_title' => 'annulla',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => 'Seleziona un colore di bordo',
'view_media_fixed_margin_title' => 'Margine',
'view_media_fixed_margin_message' => 'Inserisci un numero con un margine esterno fino a 100',
'view_media_fixed_padding_title' => 'Margine',
'view_media_fixed_padding_title' => 'imbottitura',
'view_media_fixed_padding_message' => 'Inserisci un numero con un margine interno fino a 100',
'view_media_fixed_mouse_hover_images_amplify_title' => 'Spostare il mouse sullimmagine per ingrandire',
'view_media_fixed_width_100_title' => 'Indica se la larghezza è 100%',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'すべて',
'select_all_title' => 'すべて選択',
'reverse_select_title' => 'ぎゃくせんたく',
'reverse_select_title' => 'ぎゃくせんたく',
'reset_title' => 'リセット',
'confirm_title' => '確認',
'cancel_title' => 'キャンセル',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => '境界線の色を選択してください',
'view_media_fixed_margin_title' => 'がいぶきょり',
'view_media_fixed_margin_message' => '外距離、最大100の数字を入力してください',
'view_media_fixed_padding_title' => 'がいぶきょり',
'view_media_fixed_padding_title' => '内側マージン',
'view_media_fixed_padding_message' => '内側余白、最大100の数字を入力してください',
'view_media_fixed_mouse_hover_images_amplify_title' => 'マウスポインタ画像の上に拡大',
'view_media_fixed_width_100_title' => '幅100%かどうか',

View File

@ -295,7 +295,6 @@ return [
'all_title' => '모두',
'select_all_title' => '모두 선택',
'reverse_select_title' => '역선',
'reverse_select_title' => '역선',
'reset_title' => '재설정',
'confirm_title' => '확인',
'cancel_title' => '취소',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => '모서리 색상을 선택하십시오.',
'view_media_fixed_margin_title' => '외부 여백',
'view_media_fixed_margin_message' => '외부 여백, 최대 100의 숫자를 입력하십시오.',
'view_media_fixed_padding_title' => '부 여백',
'view_media_fixed_padding_title' => '부 여백',
'view_media_fixed_padding_message' => '내부 여백, 최대 100의 숫자를 입력하십시오.',
'view_media_fixed_mouse_hover_images_amplify_title' => '롤오버 이미지 위로 확대',
'view_media_fixed_width_100_title' => '너비 100% 여부',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'geheel',
'select_all_title' => 'Alles selecteren',
'reverse_select_title' => 'Selectie omkeren',
'reverse_select_title' => 'Selectie omkeren',
'reset_title' => 'Reset',
'confirm_title' => 'bevestigen',
'cancel_title' => 'annuleren',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => 'Selecteer een randkleur',
'view_media_fixed_margin_title' => 'Marge',
'view_media_fixed_margin_message' => 'Voer een nummer in met een buitenmarge tot 100',
'view_media_fixed_padding_title' => 'Marge',
'view_media_fixed_padding_title' => 'Padding',
'view_media_fixed_padding_message' => 'Voer een nummer in met een binnenmarge tot 100',
'view_media_fixed_mouse_hover_images_amplify_title' => 'Mouse over de afbeelding om in te zoomen',
'view_media_fixed_width_100_title' => 'Of de breedte 100%is',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'Все.',
'select_all_title' => 'полное обогащение',
'reverse_select_title' => 'обратное обогащение',
'reverse_select_title' => 'обратное обогащение',
'reset_title' => 'Сбросить',
'confirm_title' => 'Подтверждение',
'cancel_title' => 'отмена',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => 'Выберите цвет боковой линии',
'view_media_fixed_margin_title' => 'Внешняя граница',
'view_media_fixed_margin_message' => 'Введите число до 100 на внешней стороне',
'view_media_fixed_padding_title' => 'Внешняя граница',
'view_media_fixed_padding_title' => 'Интервал',
'view_media_fixed_padding_message' => 'Введите число до 100',
'view_media_fixed_mouse_hover_images_amplify_title' => 'Увеличить изображение мыши',
'view_media_fixed_width_100_title' => 'Ширина 100%',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'Todo',
'select_all_title' => 'Selección completa',
'reverse_select_title' => 'Anti - Elección',
'reverse_select_title' => 'Anti - Elección',
'reset_title' => 'Restablecer',
'confirm_title' => 'Confirmación',
'cancel_title' => 'Cancelación',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => 'Por favor, elija el color de la Línea lateral',
'view_media_fixed_margin_title' => 'Margen exterior',
'view_media_fixed_margin_message' => 'Introduzca el margen exterior, el número máximo de 100',
'view_media_fixed_padding_title' => 'Margen exterior',
'view_media_fixed_padding_title' => 'Margen interior',
'view_media_fixed_padding_message' => 'Introduzca el margen interior, el número máximo de 100',
'view_media_fixed_mouse_hover_images_amplify_title' => 'Ampliación por encima de la imagen de suspensión del ratón',
'view_media_fixed_width_100_title' => 'Si el ancho es del 100%',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'hela',
'select_all_title' => 'Välj alla',
'reverse_select_title' => 'Omvänd markering',
'reverse_select_title' => 'Omvänd markering',
'reset_title' => 'Återställ',
'confirm_title' => 'bekräfta',
'cancel_title' => 'avbryt',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => 'Välj en kantfärg',
'view_media_fixed_margin_title' => 'Marginal',
'view_media_fixed_margin_message' => 'Ange ett tal med en yttre marginal på upp till 100',
'view_media_fixed_padding_title' => 'Marginal',
'view_media_fixed_padding_title' => 'Stoppning',
'view_media_fixed_padding_message' => 'Ange ett nummer med en inre marginal på upp till 100',
'view_media_fixed_mouse_hover_images_amplify_title' => 'Musen över bilden för att zooma in',
'view_media_fixed_width_100_title' => 'Om bredden är 100%',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'ทั้งหมด',
'select_all_title' => 'เลือกทั้งหมด',
'reverse_select_title' => 'ต่อต้านการเลือกตั้ง',
'reverse_select_title' => 'ต่อต้านการเลือกตั้ง',
'reset_title' => 'รีเซ็ต',
'confirm_title' => 'ยืนยัน',
'cancel_title' => 'การยกเลิก',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => 'กรุณาเลือกสีของเส้นด้านข้าง',
'view_media_fixed_margin_title' => 'ขอบด้านนอก',
'view_media_fixed_margin_message' => 'กรุณาใส่ตัวเลขของขอบด้านนอกสูงสุด 100',
'view_media_fixed_padding_title' => 'ขอบด้านอก',
'view_media_fixed_padding_title' => 'ขอบด้านน',
'view_media_fixed_padding_message' => 'กรุณาใส่ตัวเลขของขอบด้านในสูงสุด 100',
'view_media_fixed_mouse_hover_images_amplify_title' => 'เมาส์เลื่อนเหนือภาพเพื่อขยาย',
'view_media_fixed_width_100_title' => 'ไม่ว่าจะเป็นความกว้าง 100%',

View File

@ -295,7 +295,6 @@ return [
'all_title' => 'Tất cả',
'select_all_title' => 'Chọn tất cả',
'reverse_select_title' => 'Chọn ngược',
'reverse_select_title' => 'Chọn ngược',
'reset_title' => 'Đặt lại',
'confirm_title' => 'Xác nhận',
'cancel_title' => 'Hủy bỏ',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => 'Vui lòng chọn màu đường viền',
'view_media_fixed_margin_title' => 'Khoảng cách bên ngoài',
'view_media_fixed_margin_message' => 'Vui lòng nhập khoảng cách bên ngoài, số tối đa 100',
'view_media_fixed_padding_title' => 'Khoảng cách bên ngoài',
'view_media_fixed_padding_title' => 'Lề trong',
'view_media_fixed_padding_message' => 'Vui lòng nhập số bên trong lề, tối đa 100',
'view_media_fixed_mouse_hover_images_amplify_title' => 'Phóng to trên hình ảnh di chuột',
'view_media_fixed_width_100_title' => 'Chiều rộng 100%',

View File

@ -295,7 +295,6 @@ return [
'all_title' => '全部',
'select_all_title' => '全选',
'reverse_select_title' => '反选',
'reverse_select_title' => '反选',
'reset_title' => '重置',
'confirm_title' => '确认',
'cancel_title' => '取消',
@ -2390,7 +2389,7 @@ return [
'view_media_fixed_border_color_message' => '请选择边线颜色',
'view_media_fixed_margin_title' => '外边距',
'view_media_fixed_margin_message' => '请输入外边距、最大100的数字',
'view_media_fixed_padding_title' => '边距',
'view_media_fixed_padding_title' => '边距',
'view_media_fixed_padding_message' => '请输入内边距、最大100的数字',
'view_media_fixed_mouse_hover_images_amplify_title' => '鼠标悬停图片上方放大',
'view_media_fixed_width_100_title' => '是否宽度100%',

View File

@ -2185,6 +2185,9 @@ class UserService
// 是否一键登录
$is_onekey_mobile_bind = isset($params['is_onekey_mobile_bind']) && $params['is_onekey_mobile_bind'] == 1 ? 1 : 0;
// 是否需要添加用户
$is_insert_user = false;
// 用户信息处理
$user_platform = self::UserPlatformInfo($field, $params['openid']);
if(!empty($user_platform))
@ -2193,41 +2196,39 @@ class UserService
$user = self::UserBaseInfo('id', $user_platform['user_id']);
if(empty($user))
{
return DataReturn(MyLang('common_service.user.user_no_exist_tips'), -1);
}
// 用户状态
if($user['status'] != 0)
{
return DataReturn(MyLang('common_service.user.user_not_audit_tips'), -301);
}
// 如果是一键登录、如当前用户不存在手机号码则绑定
if(empty($user['mobile']) && !empty($data['mobile']) && $is_onekey_mobile_bind == 1)
{
// 手机号码不存在则绑定到当前账号下
$temp = self::UserBaseInfo('mobile', $data['mobile']);
if(empty($temp))
$is_insert_user = true;
} else {
// 用户状态
if($user['status'] != 0)
{
$upd_data = [
'mobile' => $data['mobile'],
'upd_time' => time(),
];
if(Db::name('User')->where(['id'=>$user['id']])->update($upd_data))
return DataReturn(MyLang('common_service.user.user_not_audit_tips'), -301);
}
// 如果是一键登录、如当前用户不存在手机号码则绑定
if(empty($user['mobile']) && !empty($data['mobile']) && $is_onekey_mobile_bind == 1)
{
// 手机号码不存在则绑定到当前账号下
$temp = self::UserBaseInfo('mobile', $data['mobile']);
if(empty($temp))
{
return DataReturn(MyLang('bind_success'), 0, self::AppUserInfoHandle($user['id']));
}
} else {
if($user['id'] != $temp['id'])
{
return DataReturn(MyLang('common_service.user.mobile_already_bind_account_tips'), -1);
$upd_data = [
'mobile' => $data['mobile'],
'upd_time' => time(),
];
if(Db::name('User')->where(['id'=>$user['id']])->update($upd_data))
{
return DataReturn(MyLang('bind_success'), 0, self::AppUserInfoHandle($user['id']));
}
} else {
if($user['id'] != $temp['id'])
{
return DataReturn(MyLang('common_service.user.mobile_already_bind_account_tips'), -1);
}
}
}
return DataReturn(MyLang('auth_success'), 0, $user);
}
return DataReturn(MyLang('auth_success'), 0, $user);
} else {
// 是否需要添加用户
$is_insert_user = false;
// 用户unionid
$unionid = self::UserUnionidHandle($params);
if(!empty($unionid['field']) && !empty($unionid['value']))
@ -2237,46 +2238,47 @@ class UserService
if(!empty($unionid_user_platform))
{
// 用户信息
$unionid_user_base = self::UserBaseInfo('id', $user_platform['user_id']);
$unionid_user_base = self::UserBaseInfo('id', $unionid_user_platform['user_id']);
if(empty($user))
{
return DataReturn(MyLang('common_service.user.user_no_exist_tips'), -1);
}
// 用户状态
if($unionid_user_base['status'] != 0)
{
return DataReturn(MyLang('common_service.user.user_not_audit_tips'), -301);
}
// openid绑定
if(!self::UserPlatformUpdate('id', $unionid_user_platform['id'], [$field => $params['openid']], $params))
{
return DataReturn(MyLang('bind_fail'), -1);
}
// 如果是一键登录、如当前用户不存在手机号码则绑定
if(empty($unionid_user_base['mobile']) && !empty($data['mobile']) && $is_onekey_mobile_bind == 1)
{
// 手机号码不存在则绑定到当前账号下
$temp = self::UserBaseInfo('mobile', $data['mobile']);
if(empty($temp))
$is_insert_user = true;
} else {
// 用户状态
if($unionid_user_base['status'] != 0)
{
$upd_data = [
'mobile' => $data['mobile'],
'upd_time' => time(),
];
if(!Db::name('User')->where(['id'=>$unionid_user_base['id']])->update($upd_data))
return DataReturn(MyLang('common_service.user.user_not_audit_tips'), -301);
}
// openid绑定
if(!self::UserPlatformUpdate('id', $unionid_user_platform['id'], [$field => $params['openid']], $params))
{
return DataReturn(MyLang('bind_fail'), -1);
}
// 如果是一键登录、如当前用户不存在手机号码则绑定
if(empty($unionid_user_base['mobile']) && !empty($data['mobile']) && $is_onekey_mobile_bind == 1)
{
// 手机号码不存在则绑定到当前账号下
$temp = self::UserBaseInfo('mobile', $data['mobile']);
if(empty($temp))
{
return DataReturn(MyLang('bind_fail'), -1);
}
} else {
if($unionid_user_base['id'] != $temp['id'])
{
return DataReturn(MyLang('common_service.user.mobile_already_bind_account_tips'), -1);
$upd_data = [
'mobile' => $data['mobile'],
'upd_time' => time(),
];
if(!Db::name('User')->where(['id'=>$unionid_user_base['id']])->update($upd_data))
{
return DataReturn(MyLang('bind_fail'), -1);
}
} else {
if($unionid_user_base['id'] != $temp['id'])
{
return DataReturn(MyLang('common_service.user.mobile_already_bind_account_tips'), -1);
}
}
}
return DataReturn(MyLang('bind_success'), 0, self::AppUserInfoHandle($unionid_user_base['id']));
}
return DataReturn(MyLang('bind_success'), 0, self::AppUserInfoHandle($unionid_user_base['id']));
}
// 如果用户不存在数据库中则unionid放入用户data中
@ -2314,27 +2316,27 @@ class UserService
}
}
}
}
// 添加用户
if($is_insert_user)
{
// 是否需要审核
$common_register_is_enable_audit = MyC('common_register_is_enable_audit', 0);
$data['status'] = ($common_register_is_enable_audit == 1) ? 3 : 0;
// 添加用户
if($is_insert_user)
$ret = self::UserInsert($data, $params);
if($ret['code'] == 0)
{
// 是否需要审核
$common_register_is_enable_audit = MyC('common_register_is_enable_audit', 0);
$data['status'] = ($common_register_is_enable_audit == 1) ? 3 : 0;
// 添加用户
$ret = self::UserInsert($data, $params);
if($ret['code'] == 0)
if($common_register_is_enable_audit == 1)
{
// 是否需要审核
if($common_register_is_enable_audit == 1)
{
return DataReturn(MyLang('common_service.user.user_not_audit_tips'), -110);
}
return DataReturn(MyLang('auth_success'), 0, self::AppUserInfoHandle($ret['data']['user_id']));
return DataReturn(MyLang('common_service.user.user_not_audit_tips'), -110);
}
return $ret;
return DataReturn(MyLang('auth_success'), 0, self::AppUserInfoHandle($ret['data']['user_id']));
}
return $ret;
}
return DataReturn(MyLang('auth_success'), 0, self::AppUserInfoHandle(null, null, null, $data));
}

View File

@ -228,7 +228,7 @@ class Excel
$temp_letter = $letter_data[$temp_cum];
$height = isset($tv['height']) ? intval($tv['height']) : 0;
$width = isset($tv['width']) ? intval($tv['width']) : $height;
if($tv['type'] == 'images')
if($tv['type'] == 'images' && !empty($v[$tk]))
{
$drawing = new \PhpOffice\PhpSpreadsheet\Worksheet\Drawing();
$drawing->setPath($v[$tk]);

View File

@ -470,15 +470,16 @@ class Alipay
$result = $this->HttpRequest('https://openapi.alipay.com/gateway.do', $parameter);
$key = str_replace('.', '_', $parameter['method']).'_response';
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 状态
if(isset($result[$key]['code']) && $result[$key]['code'] == 10000)
{
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 统一返回格式
$data = [
'out_trade_no' => isset($result[$key]['out_trade_no']) ? $result[$key]['out_trade_no'] : '',

View File

@ -495,15 +495,16 @@ class AlipayCert
// 执行请求
$result = $this->HttpRequest('https://openapi.alipay.com/gateway.do', $parameter);
$key = str_replace('.', '_', $parameter['method']).'_response';
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 状态
if(isset($result[$key]['code']) && $result[$key]['code'] == 10000)
{
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 统一返回格式
$data = [
'out_trade_no' => isset($result[$key]['out_trade_no']) ? $result[$key]['out_trade_no'] : '',

View File

@ -116,6 +116,12 @@ class AlipayFace
*/
public function Pay($params = [])
{
// 参数
if(empty($params['check_url']))
{
return DataReturn('支付状态校验地址不能为空', -50);
}
// openssl
if(!function_exists('openssl_sign'))
{
@ -162,40 +168,39 @@ class AlipayFace
$result = $this->HttpRequest('https://openapi.alipay.com/gateway.do', $parameter);
$key = str_replace('.', '_', $parameter['method']).'_response';
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 状态
if(isset($result[$key]['code']) && $result[$key]['code'] == 10000 && !empty($result[$key]['qr_code']))
if(isset($result[$key]['code']) && $result[$key]['code'] == 10000)
{
if(empty($params['check_url']))
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('支付状态校验地址不能为空', -50);
return DataReturn('签名验证错误', -1);
}
if(APPLICATION == 'app')
// 存在二维码
if(!empty($result[$key]['qr_code']))
{
$data = [
'pay_url' => $result[$key]['qr_code'],
'qrcode_url' => MyUrl('index/qrcode/index', ['content'=>urlencode(base64_encode($result[$key]['qr_code']))]),
'order_no' => $params['order_no'],
'name' => '支付宝支付',
'msg' => '打开支付宝APP扫一扫进行支付',
'check_url' => $params['check_url'],
];
} else {
$pay_params = [
'url' => urlencode(base64_encode($result[$key]['qr_code'])),
'order_no' => $params['order_no'],
'name' => urlencode('支付宝支付'),
'msg' => urlencode('打开支付宝APP扫一扫进行支付'),
'check_url' => urlencode(base64_encode($params['check_url'])),
];
$data = MyUrl('index/pay/qrcode', $pay_params);
if(APPLICATION == 'app')
{
$data = [
'pay_url' => $result[$key]['qr_code'],
'qrcode_url' => MyUrl('index/qrcode/index', ['content'=>urlencode(base64_encode($result[$key]['qr_code']))]),
'order_no' => $params['order_no'],
'name' => '支付宝支付',
'msg' => '打开支付宝APP扫一扫进行支付',
'check_url' => $params['check_url'],
];
} else {
$pay_params = [
'url' => urlencode(base64_encode($result[$key]['qr_code'])),
'order_no' => $params['order_no'],
'name' => urlencode('支付宝支付'),
'msg' => urlencode('打开支付宝APP扫一扫进行支付'),
'check_url' => urlencode(base64_encode($params['check_url'])),
];
$data = MyUrl('index/pay/qrcode', $pay_params);
}
return DataReturn('success', 0, $data);
}
return DataReturn('success', 0, $data);
}
// 直接返回支付信息
@ -348,15 +353,15 @@ class AlipayFace
$result = $this->HttpRequest('https://openapi.alipay.com/gateway.do', $parameter);
$key = str_replace('.', '_', $parameter['method']).'_response';
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 状态
if(isset($result[$key]['code']) && $result[$key]['code'] == 10000)
{
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 统一返回格式
$data = [
'out_trade_no' => isset($result[$key]['out_trade_no']) ? $result[$key]['out_trade_no'] : '',

View File

@ -184,15 +184,16 @@ class AlipayMini
$result = $this->HttpRequest('https://openapi.alipay.com/gateway.do', $parameter);
$key = str_replace('.', '_', $parameter['method']).'_response';
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 状态
if(isset($result[$key]['code']) && $result[$key]['code'] == 10000)
{
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 成功
return DataReturn('处理成功', 0, $result[$key]['trade_no']);
}
@ -346,15 +347,15 @@ class AlipayMini
$result = $this->HttpRequest('https://openapi.alipay.com/gateway.do', $parameter);
$key = str_replace('.', '_', $parameter['method']).'_response';
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 状态
if(isset($result[$key]['code']) && $result[$key]['code'] == 10000)
{
// 验证签名
if(!$this->SyncRsaVerify($result, $key))
{
return DataReturn('签名验证错误', -1);
}
// 统一返回格式
$data = [
'out_trade_no' => isset($result[$key]['out_trade_no']) ? $result[$key]['out_trade_no'] : '',

View File

@ -171,15 +171,16 @@ class AlipayScanQrcode
$key = str_replace('.', '_', $parameter['method']).'_response';
$result = $res['data'][$key];
// 验证签名
if(!$this->SyncRsaVerify($result, $res['data']['sign']))
{
return DataReturn('签名验证错误', -1);
}
// 状态
if(isset($result['code']) && $result['code'] == 10000)
{
// 验证签名
if(!$this->SyncRsaVerify($result, $res['data']['sign']))
{
return DataReturn('签名验证错误', -1);
}
// 成功
return DataReturn('支付成功', 0, $this->ReturnData($result));
}
@ -341,15 +342,15 @@ class AlipayScanQrcode
$key = str_replace('.', '_', $parameter['method']).'_response';
$result = $res['data'][$key];
// 验证签名
if(!$this->SyncRsaVerify($result, $res['data']['sign']))
{
return DataReturn('签名验证错误', -1);
}
// 状态
if(isset($result['code']) && $result['code'] == 10000)
{
// 验证签名
if(!$this->SyncRsaVerify($result, $res['data']['sign']))
{
return DataReturn('签名验证错误', -1);
}
// 统一返回格式
$data = [
'out_trade_no' => isset($result['out_trade_no']) ? $result['out_trade_no'] : '',

View File

@ -1,7 +1,10 @@
var store = $.AMUI.store;
if(store.enabled)
{
// 选择缓存key
var store_use_new_address_status_key = 'store-buy-use-new-address-status-count';
} else {
alert(lang_store_enabled_tips || '您的浏览器不支持本地存储。请禁用“专用模式”,或升级到现代浏览器。');
}
$(function()