我使用USAEPAY网络服务进行信用卡服务,包括添加,更新和删除信用卡。添加/更新工作正常,但信用卡删除导致错误:
com.usaepay.api.jaxws.GeneralFault_Exception:40030:找不到客户
这很奇怪,因为我检查了所有其他操作中的客户编号,这个编号是相同的并且可以正常工作
代码示例
添加信用卡:
public void addPaymentMethodToCustomer(String customerNum, SavedCreditCardInfo savedCreditCardInfo, Address address) {
UeSecurityToken securityToken = getSecurityToken(null);
PaymentMethod paymentMethod = createUSAEPaymentMethod(savedCreditCardInfo, address);
BigInteger paymentMethodID = null;
if(securityToken != null) {
try {
UeSoapServerPortType client = getClient();
paymentMethodID = client.addCustomerPaymentMethod(securityToken, new BigInteger(customerNum), paymentMethod, false, false);
} catch (Exception e) {
LOG.error("Unable to add payment method for customer " + customerNum, e);
throw new AddPaymentMethodException("Unable to add payment method for USA E Pay customer num " + customerNum);
}
LOG.info("Succesfully added payment method for customer=" + customerNum + " with payment method=" + paymentMethodID );
}
}
日志:
INFO com.smartdestinations.service.payment.impl.USAEPayServiceImpl:288 - 成功为客户添加付款方式= 25468380,付款方式= 12184
删除:
public void deleteCustomerPaymentMethod(String paymentMethodId, String customerNum) {
UeSecurityToken securityToken = getSecurityToken(null);
if(securityToken != null) {
try {
UeSoapServerPortType client = getClient();
client.deleteCustomerPaymentMethod(securityToken, new BigInteger(customerNum), new BigInteger(paymentMethodId));
} catch (Exception e) {
LOG.error("Unable to delete payment method with customerNumber=" + customerNum + " and paymentID=" + paymentMethodId, e);
throw new DeletePaymentMethodException("Unable to delete payment with id " + paymentMethodId + " for customer " + customerNum);
}
}
}
日志: com.smartdestinations.service.payment.impl.USAEPayServiceImpl:388 - 无法删除customerNumber = 25468380和paymentID = 12184的付款方式 com.usaepay.api.jaxws.GeneralFault_Exception:40030:找不到客户
答案 0 :(得分:0)
这似乎是USAEPAY的一个错误。他们答应修复这个错误