添加返回支付地址
This commit is contained in:
1 parent
361bfd6421
commit
3161365ec8
4 files changed
+23
-2
No files matched your search
+11
@@ -1,10 +1,12 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.exception.CustomException;
|
||||
import com.ruoyi.system.domain.vo.PaymentOrderCreateResult;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/** 支付订单业务金额与 USDT 实付金额换算测试。 */
|
||||
public class PaymentOrderOpenApiServiceTest {
|
||||
@@ -25,4 +27,13 @@ public class PaymentOrderOpenApiServiceTest {
|
||||
public void shouldRejectInvalidExchangeRate() {
|
||||
PaymentOrderOpenApiService.calculateActualAmount(BigDecimal.ONE, BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldExposeConfiguredCheckoutUrlInCreateResult() {
|
||||
String checkoutUrl = "http://192.168.3.103/public/usdtCheckout";
|
||||
PaymentOrderCreateResult result = new PaymentOrderCreateResult(
|
||||
"order-1", "trade-1", "TAddress", BigDecimal.ONE, new Date(), checkoutUrl);
|
||||
|
||||
Assert.assertEquals(checkoutUrl, result.getUrl());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user