Reply
Highlighted
Member
Posts: 2
Registered: ‎11-03-2015
Accepted Solution

unmaskExpirationDate to ture does not unmask the expirationDate

In the https://developer.authorize.net/api/reference/index.html#customer-profiles-get-customer-profile "Try it", I was able to get the expirationDate to return "2018-06".

However, when I try it on my own test platform, it didn't work.  I am using the PHP SDK.

This is what i pull from the phplog.

request xml

<?xml version="1.0" encoding="UTF-8"?>
<getCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name><![CDATA[497eMuLaLGAv]]></name>
<transactionKey>xxxx</transactionKey>
</merchantAuthentication>
<clientId><![CDATA[sdk-php-1.9.4]]></clientId>
<customerProfileId><![CDATA[1200001078]]></customerProfileId>
<unmaskExpirationDate>true</unmaskExpirationDate>
</getCustomerProfileRequest>

 

response xml

<?xml version="1.0" encoding="utf-8"?>
<getCustomerProfileResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<messages>
<resultCode>Ok</resultCode>
<message>
<code>I00001</code>
<text>Successful.</text>
</message>
</messages>
<profile>
<merchantCustomerId>122</merchantCustomerId>
<description>TRUCK TEST AGENCY</description>
<email>phi@icloud.com</email>
<customerProfileId>1200001078</customerProfileId>
<paymentProfiles>
<billTo>
<firstName>test</firstName>
<lastName>cc</lastName>
<address>540 foothill blvd</address>
<city>san dimas</city>
<state>CA</state>
<zip>94583</zip>
<country>US</country>
<phoneNumber>9095551212</phoneNumber>
</billTo>
<customerPaymentProfileId>1200001128</customerPaymentProfileId>
<payment>
<creditCard>
<cardNumber>XXXX1125</cardNumber>
<expirationDate>xxxx</expirationDate>
</creditCard>
</payment>
</paymentProfiles>
</profile>
</getCustomerProfileResponse>

 

I am using the latest sdk from github for php.  Not sure what I am doing wrong here.


Accepted Solutions
Highlighted
Solution
Accepted by topic author darrychui
‎11-24-2017 06:44 PM
All Star
Posts: 699
Registered: ‎11-03-2016

Re: unmaskExpirationDate to ture does not unmask the expirationDate

Hi @darrychui,

 

The expiration date is masked by default in the phplog since it's possibly sensitive data. If you send the flag to unmask it, and it's returned unmasked to the SDK, the SDK will still mask it when it writes to the log, just like it will mask the card number when writing a request to the log.

 

It should be unmasked when examining the response using the SDK methods, though, as long as you sent the flag. What do you get if you do getPaymentProfiles() on the response and look at the expiration date programatically?

View solution in original post


All Replies
Highlighted
Solution
Accepted by topic author darrychui
‎11-24-2017 06:44 PM
All Star
Posts: 699
Registered: ‎11-03-2016

Re: unmaskExpirationDate to ture does not unmask the expirationDate

Hi @darrychui,

 

The expiration date is masked by default in the phplog since it's possibly sensitive data. If you send the flag to unmask it, and it's returned unmasked to the SDK, the SDK will still mask it when it writes to the log, just like it will mask the card number when writing a request to the log.

 

It should be unmasked when examining the response using the SDK methods, though, as long as you sent the flag. What do you get if you do getPaymentProfiles() on the response and look at the expiration date programatically?