Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
A
Afrishop refactored project
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Whispa
Afrishop refactored project
Commits
33dad646
提交
33dad646
authored
11月 06, 2020
作者:
Whispa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
commit commit
上级
3be0fd75
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
358 行增加
和
149 行删除
+358
-149
DpoConfig.java
src/main/java/com/example/afrishop_v3/config/DpoConfig.java
+0
-46
DpoConfigTest.java
...in/java/com/example/afrishop_v3/config/DpoConfigTest.java
+0
-50
DpoConfiguration.java
...java/com/example/afrishop_v3/config/DpoConfiguration.java
+69
-0
DpoPayController.java
...com/example/afrishop_v3/controllers/DpoPayController.java
+20
-18
FlutterWaveController.java
...xample/afrishop_v3/controllers/FlutterWaveController.java
+26
-12
PostController.java
...a/com/example/afrishop_v3/controllers/PostController.java
+18
-5
application-dev.yml
src/main/resources/application-dev.yml
+73
-0
application-prod.yml
src/main/resources/application-prod.yml
+73
-0
application-test.yml
src/main/resources/application-test.yml
+73
-0
application.properties
src/main/resources/application.properties
+6
-18
没有找到文件。
src/main/java/com/example/afrishop_v3/config/DpoConfig.java
deleted
100644 → 0
浏览文件 @
3be0fd75
package
com
.
example
.
afrishop_v3
.
config
;
/**
* @Auther: wudepeng
* @Date: 2020/02/27
* @Description:DPO配置类 (正式环境)
*/
public
class
DpoConfig
{
//创建交易请求
public
final
static
String
CREATE_TOKEN_REQUEST
=
"createToken"
;
//校验交易请求
public
final
static
String
VERIFY_TOKEN_REQUEST
=
"verifyToken"
;
//取消交易请求
public
final
static
String
CANCEL_TOKEN_REQUEST
=
"cancelToken"
;
//CompanyToken
public
final
static
String
COMPANY_TOKEN
=
"E6759E15-C2F3-4526-ADEF-8FC0017BB1C4"
;
//请求成功的状态码
public
final
static
String
SUCCESS_CODE
=
"000"
;
//DPO支付API
public
final
static
String
PAYMENT_API
=
"https://secure.3gdirectpay.com/API/v6/"
;
//重定向地址
public
final
static
String
REDIRECT_URL
=
"https://secure.3gdirectpay.com/pay.asp"
;
//服务类型
public
final
static
String
SERVICE_TYPE
=
"35711"
;
//回调地址
public
final
static
String
NOTIFY_URL
=
"http://159.138.48.71:8080/zion/dpo/notify"
;
//取消地址
public
final
static
String
BACK_URL
=
"http://159.138.48.71:8080/zion/dpo/cancel"
;
//支付成功页面
public
final
static
String
SUCCESS_URL
=
"https://www.afrieshop.com/payment_successful"
;
//支付失败页面
public
final
static
String
FAILED_URL
=
"https://www.afrieshop.com/payment_failed"
;
//支付成功页面
public
final
static
String
MOBILE_SUCCESS_URL
=
"https://m.afrieshop.com/#/Paysuccess"
;
//支付失败页面
public
final
static
String
MOBILE_FAILED_URL
=
"https://m.afrieshop.com/#/PayFail"
;
}
src/main/java/com/example/afrishop_v3/config/DpoConfigTest.java
deleted
100644 → 0
浏览文件 @
3be0fd75
package
com
.
example
.
afrishop_v3
.
config
;
/**
* @Auther: wudepeng
* @Date: 2020/03/13
* @Description:DPO配置(测试环境)
*/
public
class
DpoConfigTest
{
//创建交易请求
public
final
static
String
CREATE_TOKEN_REQUEST
=
"createToken"
;
//校验交易请求
public
final
static
String
VERIFY_TOKEN_REQUEST
=
"verifyToken"
;
//取消交易请求
public
final
static
String
CANCEL_TOKEN_REQUEST
=
"cancelToken"
;
//CompanyToken
public
final
static
String
COMPANY_TOKEN
=
"9F416C11-127B-4DE2-AC7F-D5710E4C5E0A"
;
//请求成功的状态码
public
final
static
String
SUCCESS_CODE
=
"000"
;
//DPO支付API
public
final
static
String
PAYMENT_API
=
"https://secure1.sandbox.directpay.online/API/v6/"
;
//重定向地址
public
final
static
String
REDIRECT_URL
=
"https://secure1.sandbox.directpay.online/payv2.php"
;
//回调地址
public
final
static
String
NOTIFY_URL
=
"http://165.22.82.105:7000/zion/dpo/notify"
;
//支付成功页面
public
final
static
String
SUCCESS_URL
=
"https://dev.diaosaas.com/afrishop_web/payment_successful"
;
//支付失败页面
public
final
static
String
FAILED_URL
=
"https://dev.diaosaas.com/afrishop_web/payment_failed"
;
//支付成功页面
public
final
static
String
MOBILE_SUCCESS_URL
=
"https://m.afrieshop.com/#/Paysuccess"
;
//支付失败页面
public
final
static
String
MOBILE_FAILED_URL
=
"https://m.afrieshop.com/#/PayFail"
;
//取消地址
public
final
static
String
BACK_URL
=
"http://165.22.82.105:7000/zion/dpo/cancel"
;
//服务类型
public
final
static
Integer
SERVICE_TYPE
=
5525
;
}
src/main/java/com/example/afrishop_v3/config/DpoConfiguration.java
0 → 100644
浏览文件 @
33dad646
package
com
.
example
.
afrishop_v3
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Component
;
/**
* @Auther: wudepeng
* @Date: 2020/02/27
* @Description:DPO配置类 (正式环境)
*/
@Component
@Data
@ConfigurationProperties
(
prefix
=
"dpo"
)
public
class
DpoConfiguration
{
private
String
createToken
;
private
String
verifyToken
;
private
String
cancelToken
;
private
String
companyToken
;
private
String
successCode
;
private
String
paymentApi
;
private
String
redirectUrl
;
private
Integer
serviceType
;
private
String
notifyUrl
;
private
String
backUrl
;
private
String
successUrl
;
private
String
failedUrl
;
private
String
mobileSuccessUrl
;
private
String
mobileFailedUrl
;
public
String
getPaymentApi
()
{
return
paymentApi
;
}
public
String
getSuccessCode
()
{
return
successCode
;
}
public
String
getRedirectUrl
()
{
return
redirectUrl
;
}
public
String
getCompanyToken
()
{
return
companyToken
;
}
public
String
getVerifyToken
()
{
return
verifyToken
;
}
public
String
getCreateToken
()
{
return
createToken
;
}
public
String
getNotifyUrl
()
{
return
notifyUrl
;
}
public
String
getBackUrl
()
{
return
backUrl
;
}
public
Integer
getServiceType
()
{
return
serviceType
;
}
}
src/main/java/com/example/afrishop_v3/controllers/DpoPayController.java
浏览文件 @
33dad646
...
...
@@ -2,7 +2,7 @@ package com.example.afrishop_v3.controllers;
import
com.alibaba.fastjson.JSONObject
;
import
com.example.afrishop_v3.base.Result
;
import
com.example.afrishop_v3.config.DpoConfig
;
import
com.example.afrishop_v3.config.DpoConfig
uration
;
import
com.example.afrishop_v3.enums.DeliveryStatusEnum
;
import
com.example.afrishop_v3.enums.OrderStatusEnum
;
import
com.example.afrishop_v3.enums.ResultCodeEnum
;
...
...
@@ -38,11 +38,13 @@ public class DpoPayController extends Controller {
private
final
TbCfOrderRepository
repository
;
private
final
TbCfFinanceRepository
financeRepository
;
private
final
AuthenticationUser
user
;
private
final
DpoConfiguration
config
;
public
DpoPayController
(
TbCfOrderRepository
repository
,
TbCfFinanceRepository
financeRepository
,
AuthenticationUser
user
)
{
public
DpoPayController
(
TbCfOrderRepository
repository
,
TbCfFinanceRepository
financeRepository
,
AuthenticationUser
user
,
DpoConfiguration
config
)
{
this
.
repository
=
repository
;
this
.
financeRepository
=
financeRepository
;
this
.
user
=
user
;
this
.
config
=
config
;
}
...
...
@@ -98,7 +100,7 @@ public class DpoPayController extends Controller {
Map
<
String
,
Object
>
map
=
getParameters
(
transToken
);
String
mapToXml
=
DataUtils
.
multilayerMapToXml
(
map
,
false
);
mapToXml
=
mapToXml
.
replaceAll
(
"<xml>"
,
""
).
replaceAll
(
"</xml>"
,
""
);
String
resp
=
(
String
)
HttpsUtil
.
sendHttps
(
DpoConfig
.
PAYMENT_API
,
"POST"
,
mapToXml
,
false
);
String
resp
=
(
String
)
HttpsUtil
.
sendHttps
(
config
.
getPaymentApi
()
,
"POST"
,
mapToXml
,
false
);
if
(
resp
!=
null
)
{
//将响应结果转成json格式
String
json
=
DataUtils
.
xml2json
(
resp
);
...
...
@@ -106,7 +108,7 @@ public class DpoPayController extends Controller {
JSONObject
api3G
=
jsonObject
.
getJSONObject
(
"API3G"
);
String
resCode
=
api3G
.
getString
(
"Result"
);
//校验交易状态码
if
(
DpoConfig
.
SUCCESS_CODE
.
equals
(
resCode
))
{
if
(
config
.
getSuccessCode
()
.
equals
(
resCode
))
{
TbCfUserInfo
user
=
this
.
user
.
user
();
if
(
user
.
hasFcm
()
){
sendNotification
(
user
.
getFcm
(),
"Order alert !!"
,
"Order of $"
+
order
.
getRealityPay
()
+
" has been successfully paid !!"
);
...
...
@@ -128,7 +130,7 @@ public class DpoPayController extends Controller {
tbCfToiCouponDao.changeCoupnStatus(tbCfOrderVo.getUserId(), tbCfOrderVo.getCouponId());
}*/
//3.生成支付明细
String
authurl
=
DpoConfig
.
REDIRECT_URL
+
"?ID="
+
transToken
;
String
authurl
=
config
.
getRedirectUrl
()
+
"?ID="
+
transToken
;
TbCfFinance
finance
=
createFinance
(
transToken
,
authurl
,
order
);
// TbCfFinanceVo tbCfFinanceVo = new TbCfFinanceVo();
// BeanUtils.copyProperties(finance, tbCfFinanceVo);
...
...
@@ -212,7 +214,7 @@ public class DpoPayController extends Controller {
Map
<
String
,
Object
>
map
=
getParameters
(
order
);
String
mapToXml
=
DataUtils
.
multilayerMapToXml
(
map
,
false
);
mapToXml
=
mapToXml
.
replaceAll
(
"<xml>"
,
""
).
replaceAll
(
"</xml>"
,
""
);
String
resp
=
(
String
)
HttpsUtil
.
sendHttps
(
DpoConfig
.
PAYMENT_API
,
"POST"
,
mapToXml
,
false
);
String
resp
=
(
String
)
HttpsUtil
.
sendHttps
(
config
.
getPaymentApi
()
,
"POST"
,
mapToXml
,
false
);
if
(
resp
!=
null
)
{
//将响应结果转成json格式
String
json
=
DataUtils
.
xml2json
(
resp
);
...
...
@@ -220,10 +222,10 @@ public class DpoPayController extends Controller {
JSONObject
api3G
=
jsonObject
.
getJSONObject
(
"API3G"
);
String
resCode
=
api3G
.
getString
(
"Result"
);
String
transToken
=
api3G
.
getString
(
"TransToken"
);
if
(
DpoConfig
.
SUCCESS_CODE
.
equals
(
resCode
))
{
if
(
config
.
getSuccessCode
()
.
equals
(
resCode
))
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"transToken"
,
transToken
);
resultMap
.
put
(
"payUrl"
,
DpoConfig
.
REDIRECT_URL
+
"?ID="
+
transToken
);
resultMap
.
put
(
"payUrl"
,
config
.
getRedirectUrl
()
+
"?ID="
+
transToken
);
resultMap
.
put
(
"orderInfo"
,
order
);
// result.setData(resultMap);
// logger.info("DPO支付:订单号" + orderId + "创建令牌成功");
...
...
@@ -240,8 +242,8 @@ public class DpoPayController extends Controller {
private
Map
<
String
,
Object
>
getParameters
(
String
transToken
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
apiMap
=
new
HashMap
<>();
apiMap
.
put
(
"CompanyToken"
,
DpoConfig
.
COMPANY_TOKEN
);
apiMap
.
put
(
"Request"
,
DpoConfig
.
VERIFY_TOKEN_REQUEST
);
apiMap
.
put
(
"CompanyToken"
,
config
.
getCompanyToken
()
);
apiMap
.
put
(
"Request"
,
config
.
getVerifyToken
()
);
apiMap
.
put
(
"TransactionToken"
,
transToken
);
paramMap
.
put
(
"API3G"
,
apiMap
);
return
paramMap
;
...
...
@@ -252,33 +254,33 @@ public class DpoPayController extends Controller {
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
apiMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
tranMap
=
new
HashMap
<>();
tranMap
.
put
(
"Request"
,
DpoConfig
.
CREATE_TOKEN_REQUEST
);
tranMap
.
put
(
"Request"
,
config
.
getCreateToken
()
);
tranMap
.
put
(
"PaymentAmount"
,
order
.
getRealityPay
().
setScale
(
2
,
BigDecimal
.
ROUND_UP
));
tranMap
.
put
(
"PaymentCurrency"
,
"USD"
);
tranMap
.
put
(
"CompanyRef"
,
order
.
getOrderId
());
tranMap
.
put
(
"CompanyRefUnique"
,
0
);
//回调地址
if
(
order
.
getOrderSource
()
!=
null
&&
"1"
.
equals
(
order
.
getOrderSource
().
toString
()))
{
tranMap
.
put
(
"RedirectURL"
,
DpoConfig
.
NOTIFY_URL
);
tranMap
.
put
(
"RedirectURL"
,
config
.
getNotifyUrl
()
);
}
else
if
(
order
.
getOrderSource
()
!=
null
&&
"2"
.
equals
(
order
.
getOrderSource
().
toString
()))
{
tranMap
.
put
(
"RedirectURL"
,
DpoConfig
.
NOTIFY_URL
+
"/web"
);
tranMap
.
put
(
"RedirectURL"
,
config
.
getNotifyUrl
()
+
"/web"
);
}
else
if
(
order
.
getOrderSource
()
!=
null
&&
"3"
.
equals
(
order
.
getOrderSource
().
toString
()))
{
tranMap
.
put
(
"RedirectURL"
,
DpoConfig
.
NOTIFY_URL
+
"/mobile"
);
tranMap
.
put
(
"RedirectURL"
,
config
.
getNotifyUrl
()
+
"/mobile"
);
}
System
.
out
.
println
(
"回调地址:"
+
tranMap
.
get
(
"RedirectURL"
));
//取消地址
tranMap
.
put
(
"BackURL"
,
DpoConfig
.
BACK_URL
);
tranMap
.
put
(
"BackURL"
,
config
.
getBackUrl
()
);
// tranMap.put("PTL", 5);
Map
<
String
,
Object
>
servicesMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
serviceMap
=
new
HashMap
<>();
serviceMap
.
put
(
"ServiceType"
,
DpoConfig
.
SERVICE_TYPE
);
serviceMap
.
put
(
"ServiceType"
,
config
.
getServiceType
()
);
serviceMap
.
put
(
"ServiceDescription"
,
"DPO payment,name:"
+
order
.
getUserName
()
+
",amount:$"
+
order
.
getRealityPay
());
serviceMap
.
put
(
"ServiceDate"
,
dateFormat
.
format
(
new
Date
()));
servicesMap
.
put
(
"Service"
,
serviceMap
);
apiMap
.
put
(
"Transaction"
,
tranMap
);
apiMap
.
put
(
"Services"
,
servicesMap
);
apiMap
.
put
(
"CompanyToken"
,
DpoConfig
.
COMPANY_TOKEN
);
apiMap
.
put
(
"Request"
,
DpoConfig
.
CREATE_TOKEN_REQUEST
);
apiMap
.
put
(
"CompanyToken"
,
config
.
getCompanyToken
()
);
apiMap
.
put
(
"Request"
,
config
.
getCreateToken
()
);
paramMap
.
put
(
"API3G"
,
apiMap
);
return
paramMap
;
}
...
...
src/main/java/com/example/afrishop_v3/controllers/FlutterWaveController.java
浏览文件 @
33dad646
...
...
@@ -19,6 +19,7 @@ import com.example.afrishop_v3.util.IdUtil;
import
org.json.JSONObject
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -33,28 +34,41 @@ public class FlutterWaveController extends Controller {
private
final
TbCfOrderRepository
repository
;
private
final
TbCfFinanceRepository
financeRepository
;
private
final
UserRepository
userRepository
;
private
final
DomainProperties
domainProperties
;
//
private final DomainProperties domainProperties;
private
final
AuthenticationUser
user
;
@Value
(
"${flutter.refund_url}"
)
private
String
FLUTTERWAVE_REFUND_URL
;
//退款API
private
String
FLUTTERWAVE_REFUND_URL
=
"https://api.ravepay.co/gpx/merchant/transactions/refund"
;
//校验API
@Value
(
"${flutter.pay_url}"
)
private
String
VERIFY_PAY_URL
;
// //校验API
private
String
VERIFY_PAY_URL
=
"https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify"
;
@Value
(
"${flutter.public_key}"
)
private
String
PUBLIC_KEY
;
public
FlutterWaveController
(
TbCfOrderRepository
repository
,
TbCfFinanceRepository
financeRepository
,
UserRepository
userRepository
,
DomainProperties
domainProperties
,
AuthenticationUser
user
)
{
@Value
(
"${flutter.secret_key}"
)
private
String
SECRET_KEY
;
// //退款API
// private String FLUTTERWAVE_REFUND_URL = "https://api.ravepay.co/gpx/merchant/transactions/refund";
//
// // //校验API
// private String VERIFY_PAY_URL = "https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify";
public
FlutterWaveController
(
TbCfOrderRepository
repository
,
TbCfFinanceRepository
financeRepository
,
UserRepository
userRepository
,
AuthenticationUser
user
)
{
this
.
repository
=
repository
;
this
.
financeRepository
=
financeRepository
;
this
.
userRepository
=
userRepository
;
this
.
domainProperties
=
domainProperties
;
//
this.domainProperties = domainProperties;
this
.
user
=
user
;
}
@PostMapping
(
"/pay"
)
public
ResponseEntity
<
String
>
payForOrderByCard
(
@RequestParam
(
"orderId"
)
String
orderId
,
@RequestBody
FlutterWaveCard
flutterWaveCard
)
{
RaveConstant
.
PUBLIC_KEY
=
domainProperties
.
getProperty
(
"flutterwave.public.key"
)
;
RaveConstant
.
SECRET_KEY
=
domainProperties
.
getProperty
(
"flutterwave.secret.key"
)
;
RaveConstant
.
PUBLIC_KEY
=
PUBLIC_KEY
;
RaveConstant
.
SECRET_KEY
=
SECRET_KEY
;
RaveConstant
.
ENVIRONMENT
=
Environment
.
LIVE
;
//or live
// Result result = new Result();
Optional
<
TbCfOrder
>
byId
=
repository
.
findById
(
orderId
);
...
...
@@ -123,7 +137,7 @@ public class FlutterWaveController extends Controller {
TbCfOrder
tbCfOrderVo
=
byId
.
get
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"txref"
,
orderId
);
map
.
put
(
"SECKEY"
,
domainProperties
.
getProperty
(
"flutterwave.secret.key"
)
);
map
.
put
(
"SECKEY"
,
SECRET_KEY
);
String
data
=
HttpClientUtil
.
sendPostWithBodyParameter
(
VERIFY_PAY_URL
,
map
);
com
.
alibaba
.
fastjson
.
JSONObject
object
=
JSON
.
parseObject
(
data
);
String
statusFlag
=
object
.
getString
(
"status"
);
...
...
@@ -204,7 +218,7 @@ public class FlutterWaveController extends Controller {
@PostMapping
(
"/refund"
)
public
Result
refund
(
@RequestBody
FlutterWaveCard
flutterWaveCard
)
{
Result
result
=
new
Result
();
RaveConstant
.
SECRET_KEY
=
domainProperties
.
getProperty
(
"flutterwave.secret.key"
)
;
RaveConstant
.
SECRET_KEY
=
SECRET_KEY
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"ref"
,
flutterWaveCard
.
getRef
());
params
.
put
(
"seckey"
,
RaveConstant
.
SECRET_KEY
);
...
...
@@ -247,7 +261,7 @@ public class FlutterWaveController extends Controller {
Result
result
=
new
Result
<>();
List
<
TbCfUserInfo
>
list
=
new
ArrayList
<>();
FlutterKey
key
=
new
FlutterKey
();
String
public_key
=
domainProperties
.
getProperty
(
"flutterwave.public.key"
)
;
String
public_key
=
PUBLIC_KEY
;
list
.
add
(
userInfo
);
key
.
setPublic_key
(
public_key
);
...
...
src/main/java/com/example/afrishop_v3/controllers/PostController.java
浏览文件 @
33dad646
...
...
@@ -5,6 +5,7 @@ import com.example.afrishop_v3.enums.ResultCodeEnum;
import
com.example.afrishop_v3.models.*
;
import
com.example.afrishop_v3.repository.*
;
import
com.example.afrishop_v3.security.services.AuthenticationUser
;
import
com.example.afrishop_v3.util.OssUtil
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
...
...
@@ -251,19 +252,31 @@ public class PostController {
// Path store = storageService.store(file);
// String string = MvcUriComponentsBuilder.fromMethodName(FileUploadController.class,
// "serveFile", store.getFileName().toString()).build().toUri().toString();
String
string
=
UploadController
.
sendFile
(
sb
.
toString
(),
api
);
String
string
=
null
;
try
{
string
=
OssUtil
.
upload
(
file
,
"discover"
);
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
continue
;
}
thumbList
.
add
(
string
);
}
}
if
(
files
!=
null
)
{
for
(
MultipartFile
file
:
files
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"data:image/png;base64,"
);
sb
.
append
(
StringUtils
.
newStringUtf8
(
Base64
.
encodeBase64
(
file
.
getBytes
())));
//
StringBuilder sb = new StringBuilder();
//
sb.append("data:image/png;base64,");
//
sb.append(StringUtils.newStringUtf8(Base64.encodeBase64(file.getBytes())));
// Path store = storageService.store(file);
// String string = MvcUriComponentsBuilder.fromMethodName(FileUploadController.class,
// "serveFile", store.getFileName().toString()).build().toUri().toString();
String
string
=
UploadController
.
sendFile
(
sb
.
toString
(),
api
);
String
string
=
null
;
try
{
string
=
OssUtil
.
upload
(
file
,
"discover"
);
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
continue
;
}
list
.
add
(
string
);
Content
content
=
new
Content
();
content
.
setPost
(
post
);
...
...
src/main/resources/application-dev.yml
0 → 100644
浏览文件 @
33dad646
spring
:
datasource
:
url
:
jdbc:mysql://159.138.48.71:3306/chinafrica_ref?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
username
:
root
driver-class-name
:
com.mysql.cj.jdbc.Driver
password
:
Diaoyunnuli.8
redis
:
#Redis数据库分片索引(默认为0)
database
:
0
host
:
159.138.33.0
port
:
6379
password
:
AfriShop_date@2#!&
upload
:
api
:
http://dev.diaosaas.com:8302/africa-shop/api/upload/uploadBase64
#易境通物流
logistics
:
#客户编号
user
:
shd806
#客户密钥
token
:
d44426bd5b64dd2
#添加物流订单API
add_order
:
http://shd.kjwlxt.com/api/api_order_add.php
#物流轨迹API
track
:
http://shd.kjwlxt.com/api/track.php
#已签收API
sign
:
http://shd.kjwlxt.com/api/checkout.php
#入库API
stock
:
http://shd.kjwlxt.com/api/checkin.php
#DPO相关配置
dpo
:
#创建交易请求
create_token
:
createToken
#校验交易请求
verify_token
:
verifyToken
#取消交易请求
cancel_token
:
cancelToken
#CompanyToken
company_token
:
E6759E15-C2F3-4526-ADEF-8FC0017BB1C4
#请求成功的状态码
success_code
:
"
000"
#DPO支付API
payment_api
:
https://secure.3gdirectpay.com/API/v6/
#重定向地址
redirect_url
:
https://secure.3gdirectpay.com/pay.asp
#服务类型
service_type
:
35711
#回调地址
notify_url
:
https://app.afrieshop.com/zion/dpo/notify
#取消地址
back_url
:
https://app.afrieshop.com/zion/dpo/cancel
#支付成功页面
success_url
:
https://www.afrieshop.com/payment_successful
#支付失败页面
failed_url
:
https://www.afrieshop.com/payment_failed
#WEB支付成功页面
mobile_success_url
:
https://m.afrieshop.com/#/Paysuccess
#WEB支付成功页面
mobile_failed_url
:
https://m.afrieshop.com/#/PayFail
flutter
:
pay_url
:
https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify
refund_url
:
https://api.ravepay.co/gpx/merchant/transactions/refund
public_key
:
FLWPUBK-ee0f5d653f5f33fc89e6caf9de6a4c34-X
secret_key
:
FLWSECK-c06cdc19526077f3855b76045ca77de3-X
src/main/resources/application-prod.yml
0 → 100644
浏览文件 @
33dad646
spring
:
datasource
:
url
:
jdbc:mysql://159.138.48.71:3306/chinafrica_ref?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
username
:
root
driver-class-name
:
com.mysql.cj.jdbc.Driver
password
:
Diaoyunnuli.8
redis
:
#Redis数据库分片索引(默认为0)
database
:
0
host
:
159.138.33.0
port
:
6379
password
:
AfriShop_date@2#!&
upload
:
api
:
http://dev.diaosaas.com:8302/africa-shop/api/upload/uploadBase64
#易境通物流
logistics
:
#客户编号
user
:
shd806
#客户密钥
token
:
d44426bd5b64dd2
#添加物流订单API
add_order
:
http://shd.kjwlxt.com/api/api_order_add.php
#物流轨迹API
track
:
http://shd.kjwlxt.com/api/track.php
#已签收API
sign
:
http://shd.kjwlxt.com/api/checkout.php
#入库API
stock
:
http://shd.kjwlxt.com/api/checkin.php
#DPO相关配置
dpo
:
#创建交易请求
create_token
:
createToken
#校验交易请求
verify_token
:
verifyToken
#取消交易请求
cancel_token
:
cancelToken
#CompanyToken
company_token
:
E6759E15-C2F3-4526-ADEF-8FC0017BB1C4
#请求成功的状态码
success_code
:
"
000"
#DPO支付API
payment_api
:
https://secure.3gdirectpay.com/API/v6/
#重定向地址
redirect_url
:
https://secure.3gdirectpay.com/pay.asp
#服务类型
service_type
:
35711
#回调地址
notify_url
:
https://app.afrieshop.com/zion/dpo/notify
#取消地址
back_url
:
https://app.afrieshop.com/zion/dpo/cancel
#支付成功页面
success_url
:
https://www.afrieshop.com/payment_successful
#支付失败页面
failed_url
:
https://www.afrieshop.com/payment_failed
#WEB支付成功页面
mobile_success_url
:
https://m.afrieshop.com/#/Paysuccess
#WEB支付成功页面
mobile_failed_url
:
https://m.afrieshop.com/#/PayFail
flutter
:
pay_url
:
https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify
refund_url
:
https://api.ravepay.co/gpx/merchant/transactions/refund
public_key
:
FLWPUBK-ee0f5d653f5f33fc89e6caf9de6a4c34-X
secret_key
:
FLWSECK-c06cdc19526077f3855b76045ca77de3-X
src/main/resources/application-test.yml
0 → 100644
浏览文件 @
33dad646
spring
:
datasource
:
url
:
jdbc:mysql://47.106.242.175:3306/afrishop_test?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
username
:
root
driver-class-name
:
com.mysql.cj.jdbc.Driver
password
:
diaoyun666
redis
:
#Redis数据库分片索引(默认为0)
database
:
0
host
:
127.0.0.1
port
:
6379
password
:
upload
:
api
:
http://admin.afrieshop.com/api/upload/uploadBase64
#易境通物流
logistics
:
#客户编号
user
:
shd806
#客户密钥
token
:
d44426bd5b64dd2
#添加物流订单API
add_order
:
http://shd.kjwlxt.com/api/api_order_add.php
#物流轨迹API
track
:
http://shd.kjwlxt.com/api/track.php
#已签收API
sign
:
http://shd.kjwlxt.com/api/checkout.php
#入库API
stock
:
http://shd.kjwlxt.com/api/checkin.php
#DPO相关配置
dpo
:
#创建交易请求
createToken
:
createToken
#校验交易请求
verifyToken
:
verifyToken
#取消交易请求
cancelToken
:
cancelToken
#CompanyToken
company_token
:
9F416C11-127B-4DE2-AC7F-D5710E4C5E0A
#请求成功的状态码
success_code
:
"
000"
#DPO支付API
payment_api
:
https://secure1.sandbox.directpay.online/API/v6/
#重定向地址
redirect_url
:
https://secure1.sandbox.directpay.online/payv2.php
#服务类型
service_type
:
5525
#回调地址
notify_url
:
https://dev.diaosaas.com/zion/dpo/notify
#取消地址
back_url
:
https://dev.diaosaas.com/zion/dpo/cancel
#支付成功页面
success_url
:
https://dev.diaosaas.com/afrishop_web/payment_successful
#支付失败页面
failed_url
:
https://dev.diaosaas.com/afrishop_web/payment_failed
#WEB支付成功页面
mobile_success_url
:
https://m.afrieshop.com/#/Paysuccess
#WEB支付成功页面
mobile_failed_url
:
https://m.afrieshop.com/#/PayFail
flutter
:
pay_url
:
https://ravesandboxapi.flutterwave.com/flwv3-pug/getpaidx/api/v2/verify
refund_url
:
https://api.ravepay.co/gpx/merchant/transactions/refund
public_key
:
FLWPUBK_TEST-e3cc948e7cb24b2128fca3b781f6fce0-X
secret_key
:
FLWSECK_TEST-f88371ca63a989a4af95625475a0d22d-X
src/main/resources/application.properties
浏览文件 @
33dad646
server.servlet.context-path
=
/zion
spring.jpa.hibernate.ddl-auto
=
update
server.port
=
7000
spring.datasource.url
=
jdbc:mysql://${MYSQL_HOST:localhost}:3306/chinafrica_ref?useUnicode=true&connectionCollation=utf8mb4_general_ci&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
spring.datasource.username
=
root
spring.datasource.password
=
Diaoyunnuli.8
spring.jpa.database-platform
=
org.hibernate.dialect.MySQL5InnoDBDialect
#spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/afrishop_test?useUnicode=true&connectionCollation=utf8mb4_general_ci&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
#spring.datasource.username=root
#spring.datasource.password=Diaoyunnuli.8
#spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
spring.profiles.active
=
test
spring.datasource.connectionInitSql
:
SET NAMES 'utf8mb4'
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
security.oauth2.resource.filter-order
=
3
...
...
@@ -20,23 +21,10 @@ security.jwt.scope-write=write
security.jwt.resource-ids
=
testjwtresourceid
spring.servlet.multipart.max-file-size
=
456128KB
spring.servlet.multipart.max-request-size
=
456128KB
logistics.user
=
shd806
#????
logistics.token
=
d44426bd5b64dd2
#??????API
logistics.add_order
=
http://shd.kjwlxt.com/api/api_order_add.php
#????API
logistics.track
=
http://shd.kjwlxt.com/api/track.php
#???API
logistics.sign
=
http://shd.kjwlxt.com/api/checkout.php
#??API
logistics.stock
=
http://shd.kjwlxt.com/api/checkin.php
# App Properties
bezkoder.app.jwtSecret
=
bezKoderSecretKey
bezkoder.app.jwtExpirationMs
=
86400000
upload.api
=
http://dev.diaosaas.com:8302/africa-shop/api/upload/uploadBase64
# upload.api = http://admin.afrieshop.com/api/upload/uploadBase64
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论