mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-05-07 19:46:15 +08:00
货币类型相关
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
package com.egzosn.pay.demo.controller;
|
||||
|
||||
|
||||
import com.egzosn.pay.ali.bean.AliTransactionType;
|
||||
import com.egzosn.pay.common.api.PayService;
|
||||
import com.egzosn.pay.common.bean.CurType;
|
||||
import com.egzosn.pay.common.bean.MethodType;
|
||||
import com.egzosn.pay.common.bean.PayOrder;
|
||||
import com.egzosn.pay.common.bean.RefundOrder;
|
||||
import com.egzosn.pay.common.bean.*;
|
||||
import com.egzosn.pay.common.http.HttpConfigStorage;
|
||||
import com.egzosn.pay.paypal.api.PayPalConfigStorage;
|
||||
import com.egzosn.pay.paypal.api.PayPalPayService;
|
||||
@@ -91,7 +87,7 @@ public class PayPalPayController {
|
||||
public Map<String, Object> refund() {
|
||||
// TODO 这里需要 refundAmount, curType, description, tradeNo
|
||||
RefundOrder order = new RefundOrder();
|
||||
order.setCurType(CurType.USD);
|
||||
order.setCurType(DefaultCurType.USD);
|
||||
order.setDescription(" description ");
|
||||
order.setTradeNo("paypal 平台的单号");
|
||||
order.setRefundAmount(new BigDecimal(0.01));
|
||||
|
||||
@@ -102,7 +102,7 @@ public class PayoneerPayController {
|
||||
|
||||
PayOrder order = new PayOrder("Order_payment:", "Order payment", price, UUID.randomUUID().toString().replace("-", ""), PayoneerTransactionType.CHARGE);
|
||||
//币种
|
||||
order.setCurType(CurType.USD);
|
||||
order.setCurType(DefaultCurType.USD);
|
||||
//设置授权码,条码等
|
||||
order.setAuthCode( userId);
|
||||
//支付结果
|
||||
@@ -200,7 +200,7 @@ public class PayoneerPayController {
|
||||
@RequestMapping("transfer")
|
||||
public Map<String, Object> transfer(TransferOrder order) {
|
||||
order.setOutNo("商户转账订单号");
|
||||
order.setCurType(CurType.USD);
|
||||
order.setCurType(DefaultCurType.USD);
|
||||
order.setPayeeAccount("收款方账户,用户授权所使用的userId");
|
||||
order.setAmount(new BigDecimal(10));
|
||||
order.setRemark("转账备注, 非必填");
|
||||
|
||||
@@ -57,13 +57,13 @@ public enum CurType implements com.egzosn.pay.common.bean.CurType {
|
||||
COP(170, "哥伦比亚比索"),
|
||||
HUF(348, "匈牙利福林");
|
||||
|
||||
private int code;
|
||||
/**
|
||||
* 币种名称
|
||||
*/
|
||||
private String name;
|
||||
private int code;
|
||||
|
||||
CurType(String name, int code) {
|
||||
CurType(int code, String name) {
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ public enum YiJiTransactionType implements TransactionType {
|
||||
* 跳转收银台支付
|
||||
*/
|
||||
commonTradePay("commonTradePay"){
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return "2.0";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user