提交 a28d43e2 authored 作者: Whispa's avatar Whispa

commit commit

上级 70d99de3
...@@ -50,6 +50,9 @@ public class FlutterWaveController extends Controller { ...@@ -50,6 +50,9 @@ public class FlutterWaveController extends Controller {
@Value("${flutter.secret_key}") @Value("${flutter.secret_key}")
private String SECRET_KEY; private String SECRET_KEY;
@Value("${flutter.redirect_url}")
private String REDIRECT_URL;
// //退款API // //退款API
// private String FLUTTERWAVE_REFUND_URL = "https://api.ravepay.co/gpx/merchant/transactions/refund"; // private String FLUTTERWAVE_REFUND_URL = "https://api.ravepay.co/gpx/merchant/transactions/refund";
...@@ -94,6 +97,7 @@ public class FlutterWaveController extends Controller { ...@@ -94,6 +97,7 @@ public class FlutterWaveController extends Controller {
.setCurrency("USD") .setCurrency("USD")
.setCountry("NG") .setCountry("NG")
.setAmount(orderPrice) .setAmount(orderPrice)
.setRedirect_url(REDIRECT_URL+"/"+orderId)
.setExpiryyear(flutterWaveCard.getYear()) .setExpiryyear(flutterWaveCard.getYear())
.setExpirymonth(flutterWaveCard.getMonth()) .setExpirymonth(flutterWaveCard.getMonth())
.setEmail(flutterWaveCard.getEmail()) .setEmail(flutterWaveCard.getEmail())
...@@ -117,6 +121,12 @@ public class FlutterWaveController extends Controller { ...@@ -117,6 +121,12 @@ public class FlutterWaveController extends Controller {
return new ResponseEntity<>(json.toString(), HttpStatus.OK); return new ResponseEntity<>(json.toString(), HttpStatus.OK);
} }
@GetMapping("/notify/{orderId}")
public Result verifyFromFlutter(@PathVariable("orderId") String orderId) {
return verifyPay(orderId);
}
/** /**
* 验证付款 * 验证付款
* *
......
...@@ -64,7 +64,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -64,7 +64,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
http.cors().and().csrf().disable() http.cors().and().csrf().disable()
.exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and() .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and()
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and() .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
.authorizeRequests().antMatchers("/api/auth/**","/search/image/**", "/itemStation/**", "/startPage/**", "/goodsType/**", "/home/**", "/spider/**", "/store/**", "/shopify/**", "/community/**","/version/**").permitAll() .authorizeRequests().antMatchers("/api/auth/**","/search/image/**", "/itemStation/**", "/startPage/**", "/goodsType/**", "/home/**", "/spider/**", "/store/**", "/shopify/**", "/community/**","/version/**","/flutterwave/notify/**").permitAll()
.antMatchers("/api/test/**").permitAll() .antMatchers("/api/test/**").permitAll()
.anyRequest().authenticated(); .anyRequest().authenticated();
......
...@@ -68,6 +68,7 @@ dpo: ...@@ -68,6 +68,7 @@ dpo:
flutter: flutter:
pay_url: https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify pay_url: https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify
refund_url: https://api.ravepay.co/gpx/merchant/transactions/refund refund_url: https://api.ravepay.co/gpx/merchant/transactions/refund
redirect_url: http://159.138.48.71:8080/zion/flutterwave/notify
public_key: FLWPUBK-ee0f5d653f5f33fc89e6caf9de6a4c34-X public_key: FLWPUBK-ee0f5d653f5f33fc89e6caf9de6a4c34-X
secret_key: FLWSECK-c06cdc19526077f3855b76045ca77de3-X secret_key: FLWSECK-c06cdc19526077f3855b76045ca77de3-X
...@@ -68,6 +68,7 @@ dpo: ...@@ -68,6 +68,7 @@ dpo:
flutter: flutter:
pay_url: https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify pay_url: https://api.ravepay.co/flwv3-pug/getpaidx/api/v2/verify
refund_url: https://api.ravepay.co/gpx/merchant/transactions/refund refund_url: https://api.ravepay.co/gpx/merchant/transactions/refund
redirect_url: http://159.138.48.71:8080/zion/flutterwave/notify
public_key: FLWPUBK-ee0f5d653f5f33fc89e6caf9de6a4c34-X public_key: FLWPUBK-ee0f5d653f5f33fc89e6caf9de6a4c34-X
secret_key: FLWSECK-c06cdc19526077f3855b76045ca77de3-X secret_key: FLWSECK-c06cdc19526077f3855b76045ca77de3-X
...@@ -69,5 +69,6 @@ dpo: ...@@ -69,5 +69,6 @@ dpo:
flutter: flutter:
pay_url: https://ravesandboxapi.flutterwave.com/flwv3-pug/getpaidx/api/v2/verify pay_url: https://ravesandboxapi.flutterwave.com/flwv3-pug/getpaidx/api/v2/verify
refund_url: https://api.ravepay.co/gpx/merchant/transactions/refund refund_url: https://api.ravepay.co/gpx/merchant/transactions/refund
redirect_url: http://165.22.82.105:7000/zion/flutterwave/notify
public_key: FLWPUBK_TEST-e3cc948e7cb24b2128fca3b781f6fce0-X public_key: FLWPUBK_TEST-e3cc948e7cb24b2128fca3b781f6fce0-X
secret_key: FLWSECK_TEST-f88371ca63a989a4af95625475a0d22d-X secret_key: FLWSECK_TEST-f88371ca63a989a4af95625475a0d22d-X
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论