Browse Source

添加 麻瓜宝 支付渠道

兔姬桑 5 years ago
parent
commit
be6b10df6e

+ 1 - 1
app/Components/Helpers.php

@@ -105,7 +105,7 @@ class Helpers
 			$data[$vo->name] = $vo->value;
 		}
 
-		$data['is_onlinePay'] = ($data['is_AliPay'] || $data['is_QQPay'] || $data['is_WeChatPay'])? : 0;
+		$data['is_onlinePay'] = ($data['is_AliPay'] || $data['is_QQPay'] || $data['is_WeChatPay'] || $data['is_otherPay'])? : 0;
 
 		return $data;
 	}

+ 6 - 1
app/Http/Controllers/AdminController.php

@@ -1991,7 +1991,7 @@ EOF;
 		}
 
 		// 支付设置判断
-		if(in_array($name, ['is_AliPay', 'is_QQPay', 'is_WeChatPay']) && $value != ''){
+		if(in_array($name, ['is_AliPay', 'is_QQPay', 'is_WeChatPay', 'is_otherPay']) && $value != ''){
 			switch($value){
 				case 'f2fpay':
 					if(!self::$systemConfig['f2fpay_app_id'] || !self::$systemConfig['f2fpay_private_key'] || !self::$systemConfig['f2fpay_public_key']){
@@ -2008,6 +2008,11 @@ EOF;
 						return Response::json(['status' => 'fail', 'message' => '请先设置【PayJs】必要参数']);
 					}
 					break;
+				case 'bitpayx':
+					if(!self::$systemConfig['bitpayx']){
+						return Response::json(['status' => 'fail', 'message' => '请先设置【麻瓜宝】必要参数']);
+					}
+					break;
 				default:
 					return Response::json(['status' => 'fail', 'message' => '未知支付渠道']);
 					break;

+ 2 - 0
app/Http/Controllers/Gateway/AopF2F.php

@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Gateway;
 use App\Http\Models\Payment;
 use Auth;
 use Exception;
+use Log;
 use Omnipay\Alipay\Responses\AopCompletePurchaseResponse;
 use Omnipay\Alipay\Responses\AopTradePreCreateResponse;
 use Omnipay\Omnipay;
@@ -67,6 +68,7 @@ class AopF2F extends AbstractPayment
 				exit('success');
 			}
 		}catch(Exception $e){
+			Log::error('支付宝当面付 '.$e);
 			exit('fail');
 		}
 	}

+ 148 - 0
app/Http/Controllers/Gateway/BitpayX.php

@@ -0,0 +1,148 @@
+<?php
+
+
+namespace App\Http\Controllers\Gateway;
+
+
+use App\Http\Models\Payment;
+use Auth;
+use Illuminate\Http\Request;
+use Response;
+
+class BitpayX extends AbstractPayment
+{
+	private $bitpayGatewayUri= 'https://api.mugglepay.com/v1/';
+
+	public function mprequest($data, $type = 'pay')
+	{
+		$headers = ['content-type: application/json', 'token: '.parent::$systemConfig['bitpay_secret']];
+		$curl = curl_init();
+		if($type === 'pay'){
+			$this->bitpayGatewayUri .= 'orders';
+			curl_setopt($curl, CURLOPT_URL, $this->bitpayGatewayUri);
+			curl_setopt($curl, CURLOPT_POST, 1);
+			$data_string = json_encode($data);
+			curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
+		}elseif($type === 'query'){
+			$this->bitpayGatewayUri .= 'orders/merchant_order_id/status?id='.$data['merchant_order_id'];
+			curl_setopt($curl, CURLOPT_URL, $this->bitpayGatewayUri);
+			curl_setopt($curl, CURLOPT_HTTPGET, 1);
+		}
+		curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
+		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
+		curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
+		curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
+		$data = curl_exec($curl);
+		curl_close($curl);
+
+		return $data;
+	}
+
+	/**
+	 * @param Request $request
+	 *
+	 * @return mixed
+	 */
+	public function purchase(Request $request)
+	{
+		$payment = new Payment();
+		$payment->sn = self::generateGuid();
+		$payment->user_id = Auth::user()->id;
+		$payment->oid = $request->input('oid');
+		$payment->amount = $request->input('amount');
+		$payment->save();
+
+		$data = [
+			'merchant_order_id' => $payment->sn,
+			'price_amount'      => (float)$request->input('amount'),
+			'price_currency'    => 'CNY',
+			'pay_currency'      => $request->input('type') == 1? 'ALIPAY' : 'WECHAT',
+			'title'             => '支付单号:'.$payment->sn,
+			'description'       => parent::$systemConfig['subject_name']? : parent::$systemConfig['website_name'],
+			'callback_url'      => (parent::$systemConfig['website_callback_url']? : parent::$systemConfig['website_url']).'/payment/notify',
+			'success_url'       => parent::$systemConfig['website_url'].'/invoices',
+			'cancel_url'        => parent::$systemConfig['website_url'],
+			'token'             => $this->sign($this->prepareSignId($payment->sn)),
+
+		];
+
+		$result = json_decode($this->mprequest($data), TRUE);
+
+
+		if($result['status'] === 200 || $result['status'] === 201){
+			$result['payment_url'] .= '&lang=zh';
+
+			return Response::json(['status' => 'success', 'url' => $result['payment_url'] .= '&lang=zh', 'message' => '创建订单成功!']);
+		}
+
+		return Response::json(['status' => 'fail', 'data' => $result, 'message' => '创建订单失败!']);
+	}
+
+	public function sign($data)
+	{
+		return strtolower(md5(md5($data).parent::$systemConfig['bitpay_secret']));
+	}
+
+	public function prepareSignId($tradeno)
+	{
+		$data_sign = [
+			'merchant_order_id' => $tradeno,
+			'secret'            => parent::$systemConfig['bitpay_secret'],
+			'type'              => 'FIAT',
+		];
+		ksort($data_sign);
+
+		return http_build_query($data_sign);
+	}
+
+	public function notify(Request $request)
+	{
+		$inputString = file_get_contents('php://input', 'r');
+		$inputStripped = str_replace(["\r", "\n", "\t", "\v"], '', $inputString);
+		$inputJSON = json_decode($inputStripped, TRUE); //convert JSON into array
+		$data = [];
+		if($inputJSON !== NULL){
+			$data = [
+				'status'            => $inputJSON['status'],
+				'order_id'          => $inputJSON['order_id'],
+				'merchant_order_id' => $inputJSON['merchant_order_id'],
+				'price_amount'      => $inputJSON['price_amount'],
+				'price_currency'    => $inputJSON['price_currency'],
+				'created_at_t'      => $inputJSON['created_at_t'],
+			];
+		}
+		// 准备待签名数据
+		$str_to_sign = $this->prepareSignId($inputJSON['merchant_order_id']);
+		$resultVerify = $this->verify($str_to_sign, $inputJSON['token']);
+		$isPaid = $data !== NULL && $data['status'] !== NULL && $data['status'] === 'PAID';
+
+		if($resultVerify && $isPaid){
+			$this->postPayment($inputJSON['merchant_order_id'], 'BitPayX');
+			$return = [];
+			$return['status'] = 200;
+			echo json_encode($return);
+		}else{
+			$return = [];
+			$return['status'] = 400;
+			echo json_encode($return);
+		}
+		exit();
+	}
+
+	public function verify($data, $signature)
+	{
+		$mySign = $this->sign($data);
+
+		return $mySign === $signature;
+	}
+
+	public function getReturnHTML(Request $request)
+	{
+		// TODO: Implement getReturnHTML() method.
+	}
+
+	public function getPurchaseHTML()
+	{
+		// TODO: Implement getPurchaseHTML() method.
+	}
+}

+ 1 - 1
app/Http/Controllers/Gateway/CodePay.php

@@ -21,7 +21,7 @@ class CodePay extends AbstractPayment
 		$data = [
 			'id'         => parent::$systemConfig['codepay_id'],
 			'pay_id'     => $payment->sn,
-			'type'       => $request->input('method'),//1支付宝支付 2QQ钱包 3微信支付
+			'type'       => $request->input('type'),//1支付宝支付 2QQ钱包 3微信支付
 			'price'      => $payment->amount,
 			'page'       => 4,
 			'outTime'    => 900,

+ 7 - 4
app/Http/Controllers/PaymentController.php

@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
 
 use App\Components\Helpers;
 use App\Http\Controllers\Gateway\AopF2F;
+use App\Http\Controllers\Gateway\BitpayX;
 use App\Http\Controllers\Gateway\CodePay;
 use App\Http\Controllers\Gateway\PayJs;
 use App\Http\Models\Coupon;
@@ -36,6 +37,8 @@ class PaymentController extends Controller
 				return new Codepay();
 			case 'payjs':
 				return new PayJs();
+			case 'bitpayx':
+				return new BitpayX();
 			default:
 				return NULL;
 		}
@@ -69,7 +72,7 @@ class PaymentController extends Controller
 	}
 
 	// 创建支付订单
-	public function purchase(Request $request)
+	public static function purchase(Request $request)
 	{
 		$goods_id = $request->input('goods_id');
 		$coupon_sn = $request->input('coupon_sn');
@@ -173,16 +176,16 @@ class PaymentController extends Controller
 			User::query()->where('id', Auth::user()->id)->decrement('balance', $amount*100);
 
 			// 记录余额操作日志
-			$this->addUserBalanceLog(Auth::user()->id, $order->oid, Auth::user()->balance, Auth::user()->balance-$amount, -1*$amount, '购买商品:'.$goods->name);
+			(new Controller)->addUserBalanceLog(Auth::user()->id, $order->oid, Auth::user()->balance, Auth::user()->balance-$amount, -1*$amount, '购买商品:'.$goods->name);
 			$order = Order::query()->where('oid', $orderSn)->first();
 			$order->status = 2;
 			$order->save();
 			User::query()->where('id', $order->user_id)->increment('balance', $order->amount*100);
 
 			// 余额变动记录日志
-			$this->addUserBalanceLog($order->user_id, $order->oid, $order->user->balance, $order->user->balance+$order->amount, $order->amount, '用户在线充值');
+			(new Controller)->addUserBalanceLog($order->user_id, $order->oid, $order->user->balance, $order->user->balance+$order->amount, $order->amount, '用户在线充值');
 		}else{
-			$request->merge(['oid' => $order->oid, 'amount' => $amount]);
+			$request->merge(['oid' => $order->oid, 'amount' => $amount, 'type' => $request->input('pay_type')]);
 
 			return self::getClient()->purchase($request);
 		}

+ 78 - 0
public/assets/images/bitcoin.svg

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 width="40px" height="40px" viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
+<g>
+	<path d="M3.837,20.516c-0.276,0-0.5-0.207-0.5-0.482V20c0-1.747,0.269-3.468,0.8-5.115c0.085-0.263,0.367-0.405,0.629-0.323
+		c0.263,0.085,0.407,0.367,0.323,0.629C4.59,16.739,4.337,18.357,4.337,20C4.337,20.275,4.114,20.516,3.837,20.516z M24.854,34.896
+		c-1.558,0.506-3.185,0.765-4.836,0.767c-0.276,0-0.5,0.226-0.5,0.5s0.224,0.5,0.5,0.5l0,0c1.756-0.002,3.489-0.276,5.146-0.815
+		c0.263-0.084,0.405-0.367,0.319-0.63C25.398,34.956,25.115,34.811,24.854,34.896z M5.108,24.868
+		c-0.085-0.263-0.364-0.406-0.63-0.32c-0.262,0.085-0.406,0.368-0.32,0.63c0.542,1.66,1.341,3.221,2.376,4.639
+		c0.098,0.135,0.25,0.205,0.404,0.205c0.102,0,0.206-0.03,0.294-0.097c0.223-0.163,0.272-0.476,0.109-0.698
+		C6.37,27.895,5.618,26.428,5.108,24.868z M24.794,5.084c1.563,0.502,3.033,1.246,4.37,2.212c0.089,0.064,0.191,0.095,0.292,0.095
+		c0.155,0,0.308-0.072,0.405-0.207c0.162-0.224,0.111-0.537-0.111-0.698c-1.422-1.028-2.986-1.82-4.65-2.354
+		c-0.263-0.083-0.543,0.061-0.629,0.323C24.387,4.718,24.531,5,24.794,5.084z M6.9,11.03c0.155,0,0.308-0.072,0.405-0.207
+		C8.27,9.49,9.432,8.322,10.761,7.35c0.223-0.163,0.271-0.476,0.108-0.699c-0.162-0.223-0.475-0.271-0.699-0.108
+		c-1.413,1.033-2.649,2.276-3.675,3.693c-0.162,0.224-0.112,0.536,0.112,0.698C6.696,11,6.799,11.03,6.9,11.03z M14.962,5.138
+		c0.051,0,0.104-0.008,0.156-0.025c1.556-0.51,3.183-0.771,4.835-0.775c0.275-0.001,0.5-0.225,0.499-0.501
+		c-0.001-0.275-0.226-0.499-0.5-0.499h-0.001c-1.757,0.005-3.488,0.283-5.144,0.825c-0.262,0.086-0.405,0.368-0.319,0.631
+		C14.556,5.004,14.751,5.138,14.962,5.138z M15.176,34.906c-1.562-0.506-3.031-1.252-4.366-2.221
+		c-0.223-0.164-0.537-0.112-0.698,0.109C9.95,33.02,10,33.332,10.223,33.494c1.42,1.029,2.983,1.824,4.645,2.361
+		c0.051,0.018,0.103,0.023,0.154,0.023c0.211,0,0.407-0.135,0.476-0.346C15.583,35.273,15.439,34.991,15.176,34.906z M32.676,29.202
+		c-0.968,1.33-2.133,2.496-3.463,3.465c-0.223,0.163-0.271,0.476-0.109,0.699c0.099,0.134,0.25,0.206,0.404,0.206
+		c0.102,0,0.205-0.031,0.294-0.096c1.415-1.031,2.653-2.271,3.683-3.688c0.164-0.225,0.113-0.536-0.108-0.698
+		C33.15,28.928,32.838,28.979,32.676,29.202z M36.163,19.468c-0.276,0-0.5,0.255-0.5,0.532c0,1.652-0.256,3.281-0.763,4.839
+		c-0.084,0.263,0.06,0.544,0.322,0.63c0.051,0.018,0.103,0.024,0.152,0.024c0.211,0,0.407-0.134,0.477-0.347
+		c0.539-1.656,0.812-3.39,0.812-5.146v-0.064C36.663,19.66,36.439,19.468,36.163,19.468z M34.882,15.103
+		c0.069,0.21,0.265,0.344,0.476,0.344c0.053,0,0.104-0.008,0.156-0.025c0.262-0.086,0.404-0.369,0.318-0.631
+		c-0.546-1.66-1.35-3.219-2.387-4.633c-0.164-0.223-0.478-0.271-0.698-0.107c-0.222,0.164-0.271,0.476-0.106,0.699
+		C33.615,12.078,34.369,13.543,34.882,15.103z M40,20c0,11.027-8.973,20-20,20C8.972,40,0,31.027,0,20C0,8.972,8.972,0,20,0
+		C31.027,0,40,8.972,40,20z M38,20c0-9.925-8.075-18-18-18S2,10.075,2,20s8.075,18,18,18S38,29.925,38,20z M21.686,20.818
+		c-0.334-0.127-0.844-0.191-1.528-0.191h-1.563v2.614c0.006,0.37,0.02,0.586,0.043,0.649c0.029,0.079,0.076,0.137,0.143,0.168
+		c0.066,0.03,0.246,0.049,0.539,0.049H20.2c0.512,0,0.937-0.049,1.272-0.146c0.338-0.094,0.625-0.292,0.859-0.593
+		s0.354-0.66,0.354-1.082c0-0.357-0.084-0.66-0.25-0.91C22.27,21.133,22.02,20.945,21.686,20.818z M34.436,20
+		c0,7.973-6.463,14.436-14.436,14.436c-7.972,0-14.435-6.463-14.435-14.436c0-7.972,6.463-14.435,14.435-14.435
+		C27.973,5.565,34.436,12.028,34.436,20z M25.822,22.609c0-0.536-0.127-1.021-0.381-1.457c-0.254-0.438-0.6-0.775-1.029-1.02
+		c-0.301-0.174-0.732-0.333-1.299-0.476c0.527-0.179,0.951-0.405,1.271-0.68c0.321-0.274,0.567-0.59,0.738-0.947
+		c0.17-0.358,0.255-0.736,0.255-1.134c0-0.548-0.161-1.052-0.481-1.511c-0.324-0.458-0.785-0.811-1.385-1.055
+		c-0.234-0.095-0.512-0.167-0.811-0.225v-2.131h-2.045v1.987h-1.314v-1.987h-2.045v1.987h-3.119v1.67h0.477
+		c0.317,0,0.532,0.03,0.645,0.087c0.113,0.057,0.192,0.136,0.238,0.233c0.047,0.098,0.07,0.327,0.07,0.684v6.734
+		c0,0.354-0.022,0.579-0.07,0.68c-0.046,0.102-0.125,0.18-0.238,0.233c-0.113,0.055-0.327,0.083-0.645,0.083h-0.477v1.67h3.119
+		v1.986h2.045v-1.986h1.163c0.054,0,0.103-0.001,0.152-0.001v1.987h2.045v-2.158c0.343-0.066,0.646-0.149,0.901-0.254
+		c0.705-0.281,1.25-0.691,1.639-1.231C25.628,23.841,25.822,23.25,25.822,22.609z M21.454,18.679
+		c0.333-0.115,0.581-0.29,0.749-0.521c0.167-0.233,0.25-0.504,0.25-0.81c0-0.317-0.079-0.588-0.237-0.813
+		c-0.159-0.225-0.39-0.385-0.688-0.48c-0.301-0.096-0.838-0.144-1.609-0.144h-1.324v2.943h1.324
+		C20.611,18.853,21.122,18.795,21.454,18.679z"/>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>

+ 32 - 0
resources/views/admin/system.blade.php

@@ -1017,6 +1017,15 @@
 											</select>
 										</div>
 									</div>
+									<div class="form-group col-lg-6">
+										<div class="row">
+											<label class="col-md-3 col-form-label" for="is_otherPay">特殊支付</label>
+											<select class="col-md-3" id="is_otherPay" data-plugin="selectpicker" data-style="btn-outline btn-primary" onchange="updateFromOther('select','is_otherPay')">
+												<option value="">关闭</option>
+												<option value="bitpayx">麻瓜宝</option>
+											</select>
+										</div>
+									</div>
 									<div class="form-group col-lg-6">
 										<div class="row">
 											<label class="col-md-3 col-form-label" for="subject_name">自定义商品名称</label>
@@ -1151,6 +1160,28 @@
 										</div>
 									</div>
 								</div>
+								<div class="row pb-70">
+									<div class="form-group col-lg-6">
+										<div class="row">
+											<label class="col-md-3 col-form-label">麻瓜宝 MugglePay</label>
+											<div class="col-md-7">
+												请到 <a href="https://merchants.mugglepay.com/user/register?ref=MP904BEBB79FE0" target="_blank">麻瓜宝 MugglePay</a> 申请账号
+											</div>
+										</div>
+									</div>
+									<div class="form-group col-lg-6">
+										<div class="row">
+											<label class="col-md-3 col-form-label" for="bitpay_secret">应用密钥</label>
+											<div class="col-md-7">
+												<div class="input-group">
+													<input type="text" class="form-control" id="bitpay_secret" value="{{$bitpay_secret}}"/>
+													<span class="input-group-append"><button class="btn btn-primary" type="button" onclick="update('bitpay_secret')">修改</button></span>
+												</div>
+											</div>
+											<span class="text-help offset-md-3"><a href="https://merchants.mugglepay.com/basic/api" target="_blank"> 在本页</a>中获取后台服务器的秘钥 </span>
+										</div>
+									</div>
+								</div>
 							</form>
 						</div>
 					</div>
@@ -1183,6 +1214,7 @@
             $('#is_AliPay').selectpicker('val', '{{$is_AliPay}}');
             $('#is_QQPay').selectpicker('val', '{{$is_QQPay}}');
             $('#is_WeChatPay').selectpicker('val', '{{$is_WeChatPay}}');
+            $('#is_otherPay').selectpicker('val', '{{$is_otherPay}}');
         });
 
         // 系统设置更新

+ 5 - 1
resources/views/user/buy.blade.php

@@ -157,7 +157,11 @@
                             swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
                                 .then(() => window.location.href = '/invoices')
                         }
-                        window.location.href = '/payment/' + ret.data;
+                        if (ret.data) {
+                            window.location.href = '/payment/' + ret.data;
+                        } else if (ret.url) {
+                            window.location.href = ret.url;
+                        }
                     } else if (ret.status === 'info') {
                         swal.fire({title: ret.title, text: ret.message, type: 'question'});
                     } else {

+ 3 - 0
resources/views/user/components/purchase.blade.php

@@ -6,4 +6,7 @@
 @endif
 @if(\App\Components\Helpers::systemConfig()['is_WeChatPay'])
 	<button class="btn btn-flat waves-attach" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_WeChatPay']}}','3')"><img src="/assets/images/wechat.svg" width="50px" height="50px" alt="wechat"/></button>'
+@endif
+@if(\App\Components\Helpers::systemConfig()['is_otherPay'])
+	<button class="btn btn-flat waves-attach" onclick="pay('{{\App\Components\Helpers::systemConfig()['is_otherPay']}}','x')"><img src="/assets/images/bitcoin.svg" width="50px" height="50px" alt="other"/></button>'
 @endif

+ 6 - 2
resources/views/user/services.blade.php

@@ -243,9 +243,13 @@
                     success: function (ret) {
                         if (ret.status === 'fail') {
                             return false;
-                        }else{
+                        } else {
                             $("#charge_msg").show().html(ret.message);
-                            window.location.href = '/payment/' + ret.data;
+                            if (ret.data) {
+                                window.location.href = '/payment/' + ret.data;
+                            } else if (ret.url) {
+                                window.location.href = ret.url;
+                            }
                         }
                     },
                     error: function () {

+ 5 - 5
sql/db.sql

@@ -372,15 +372,15 @@ insert into `config` VALUES ('74', 'node_daily_report', 0);
 insert into `config` VALUES ('75', 'mix_subscribe', 0);
 insert into `config` VALUES ('76', 'rand_subscribe', 0);
 insert into `config` VALUES ('77', 'is_custom_subscribe', 0);
-insert into `config` VALUES ('78', 'is_AliPay', 0);
-insert into `config` VALUES ('79', 'is_QQ', 0);
-insert into `config` VALUES ('80', 'is_WeChat', 0);
-insert into `config` VALUES ('81', 'alipay_key', '');
+insert into `config` VALUES ('78', 'is_AliPay', '');
+insert into `config` VALUES ('79', 'is_QQ', '');
+insert into `config` VALUES ('80', 'is_WeChat', '');
+insert into `config` VALUES ('81', 'is_otherPay', '');
 insert into `config` VALUES ('82', 'alipay_private_key', '');
 insert into `config` VALUES ('83', 'alipay_public_key', '');
 insert into `config` VALUES ('84', 'alipay_transport', 'http');
 insert into `config` VALUES ('85', 'alipay_currency', 'USD');
-insert into `config` VALUES ('86', 'is_f2fpay', 0);
+insert into `config` VALUES ('86', 'bitpay_secret', '');
 insert into `config` VALUES ('87', 'f2fpay_app_id', '');
 insert into `config` VALUES ('88', 'f2fpay_private_key', '');
 insert into `config` VALUES ('89', 'f2fpay_public_key', '');

+ 2 - 0
sql/mod/20200420.sql

@@ -0,0 +1,2 @@
+update `config` SET `name` = 'is_otherPay', `value` = '' where `config`.`id` = 81;
+update `config` SET `name` = 'bitpay_secret', `value` = '' where `config`.`id` = 86;