0

在我的网站中,我实现了 authorixe.net CIM 功能。我已成功创建我的用户详细信息并删除了用户帐户。现在我想检索客户资料信息。我已发送客户资料请求并尝试显示信用卡号和到期日期以更新付款流程(用于网站目标)。请参阅下面的代码

if ("Ok" == $parsedresponse->messages->resultCode) {        
    echo $parsedresponse->profile->paymentProfiles->payment->creditCard->cardNumber;
    echo $parsedresponse->profile->paymentProfiles->payment->creditCard->expirationDate;            
}

我得到最后 4 位数字作为卡号,并得到结果 XXXX 作为到期日期。

我需要像往常一样显示日期(不是 XXXX 格式)。我怎样才能得到有效期?

4

3 回答 3

2

新的 API 解决了这个问题——在请求 getCustomerPaymentProfile 上使用参数:'unmaskExpirationDate' 和'瞧!它将返回未屏蔽的到期日期。我不得不在 PHP SDK 中手动添加它,它看起来像这样:

public function getCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId, $unmaskExpiration = false)
{
    $this->_constructXml("getCustomerPaymentProfileRequest");
    $this->_xml->addChild("customerProfileId", $customerProfileId);
    $this->_xml->addChild("customerPaymentProfileId", $customerPaymentProfileId);

    if($unmaskExpiration){
        $this->_xml->addChild("unmaskExpirationDate", $unmaskExpiration);    
    }

    return $this->_sendRequest();
}
于 2016-02-02T01:08:29.710 回答
0

该信息被屏蔽,无法通过 API 检索。创建配置文件时,您需要存储到期日期,或者如果您使用它来确定他们的卡何时到期,则存储您需要开始通知他们卡即将到期的通知日期

于 2011-02-24T14:43:58.323 回答
0

此问题还有另一种解决方法。您需要做的就是在billTo个人资料信息中找到一个字段来存储您的到期日期。例如,如果您不需要存储客户的传真(或电话号码,或国家等),那么您可以使用此字段来复制到期日期。然后,当您收到个人资料时,您将能够从该字段中获取不安全的到期日期。

于 2013-10-24T07:33:10.843 回答