【问题标题】:How to delete a credit card using the USAEPAY Web service?如何使用 USAEPAY 网络服务删除信用卡?
【发布时间】:2014-06-17 18:13:08
【问题描述】:

我正在使用 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:找不到客户

【问题讨论】:

    标签: java jax-ws credit-card


    【解决方案1】:

    这似乎是 USAEPAY 中的一个错误。他们承诺会修复这个错误

    【讨论】:

      猜你喜欢
      • 2019-08-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-15
      相关资源
      最近更新 更多