|
@@ -56,8 +56,9 @@ public class CryptomusService {
|
|
|
throw new BusinessRuntimeException(GatewayApiCode.METADATA_SYSTEM_ERROR.getCode(),"The donation has been paid");
|
|
throw new BusinessRuntimeException(GatewayApiCode.METADATA_SYSTEM_ERROR.getCode(),"The donation has been paid");
|
|
|
}
|
|
}
|
|
|
CryptomusPayReq cryptomusPay = new CryptomusPayReq();
|
|
CryptomusPayReq cryptomusPay = new CryptomusPayReq();
|
|
|
- cryptomusPay.setAmount(String.valueOf(orderDon.getMoney().divide(new BigDecimal(100), 2, RoundingMode.HALF_DOWN)));
|
|
|
|
|
- cryptomusPay.setCurrency(orderDon.getCurrency());
|
|
|
|
|
|
|
+ BigDecimal money = orderDon.getMoney().divide(orderDon.getRate(),0,RoundingMode.HALF_UP);
|
|
|
|
|
+ cryptomusPay.setAmount(String.valueOf(money.divide(new BigDecimal(100), 2, RoundingMode.HALF_DOWN)));
|
|
|
|
|
+ cryptomusPay.setCurrency("USD");
|
|
|
cryptomusPay.setLifetime(1800);
|
|
cryptomusPay.setLifetime(1800);
|
|
|
cryptomusPay.setOrder_id(orderId.toString());
|
|
cryptomusPay.setOrder_id(orderId.toString());
|
|
|
cryptomusPay.setUrl_callback(host + "/applets/order/cryptomus/notify");
|
|
cryptomusPay.setUrl_callback(host + "/applets/order/cryptomus/notify");
|