I am in need of your help. The issue I am having, is that I am passing a shipping address to your API when creating a customer account, but it is not appearing on the transaction for the customer in the dashboard. I am getting no errors.
I first create a customer account, using a token -- I pass to that the shipping and billing address and opaque data token. Then I charge the card. However, when I create the customer account and charge the card over the API, only the billing address is showing in the dashboard under the transaction. I cannot figure out what is wrong!
I have attached the code (in PHP), which works successfully in production with many customers (but still doesn’t pass the shipping address, even in production), and is pretty much one to one with the code for it on GitHub (using your own library example on GitHub). So your PHP library, your PHP code example. I also attached the request and response objects. You can see the shipping address clearly defined in the request object. And the response object returns “Successful”.
For example, here is the transaction that I create (got emailed to me, but same as in the dashboard). This is just the relevant snippet:
(NOTE: I have replaced sensitive information, with ******, in the examples below)
==== CUSTOMER BILLING INFORMATION ===
Customer ID :
First Name : ********
Last Name : ********
Company :
Address : ********
City : ********
State/Province : ********
Zip/Postal Code : ********
Country : ********
Phone : ********
Fax :
E-Mail : ********
==== CUSTOMER SHIPPING INFORMATION ===
First Name :
Last Name :
Company :
Address :
City :
State/Province :
Zip/Postal Code :
Country :
The code I am using, is below. I am setting the “Shipping To” address, with the $shippingProfiles variable. If I var_dump the variable, I get:
Array
(
[0] => net\authorize\api\contract\v1\CustomerAddressType Object
(
[phoneNumber:net\authorize\api\contract\v1\CustomerAddressType:private] => ************
[faxNumber:net\authorize\api\contract\v1\CustomerAddressType:private] =>
[email:net\authorize\api\contract\v1\CustomerAddressType:private] =>
[firstName:net\authorize\api\contract\v1\NameAndAddressType:private] => ************
[lastName:net\authorize\api\contract\v1\NameAndAddressType:private] => ************
[company:net\authorize\api\contract\v1\NameAndAddressType:private] =>
[address:net\authorize\api\contract\v1\NameAndAddressType:private] => ************
[city:net\authorize\api\contract\v1\NameAndAddressType:private] => Virginia Beach
[state:net\authorize\api\contract\v1\NameAndAddressType:private] => VA
[zip:net\authorize\api\contract\v1\NameAndAddressType:private] => 23452
[country:net\authorize\api\contract\v1\NameAndAddressType:private] => US
)
Now, here is the code:
So with the code, you can see I am creating a new CustomerProfileType, and calling setShipToList, and passing $shippingProfiles. The output of $shippingProfiles, is right above the code, above. So I am passing a valid object. I am then pasing the $custmerprofile to $request->setProfile(), and then calling the API. I get no errors, and I get back a Success Message.
Here is my $request object:
object(net\authorize\api\contract\v1\CreateCustomerProfileRequest)#1888 (5) {
["profile":"net\authorize\api\contract\v1\CreateCustomerProfileRequest":private]=>
object(net\authorize\api\contract\v1\CustomerProfileType)#1850 (6) {
["paymentProfiles":"net\authorize\api\contract\v1\CustomerProfileType":private]=>
array(1) {
[0]=>
object(net\authorize\api\contract\v1\CustomerPaymentProfileType)#1814 (6) {
["payment":"net\authorize\api\contract\v1\CustomerPaymentProfileType":private]=>
object(net\authorize\api\contract\v1\PaymentType)#1811 (8) {
["creditCard":"net\authorize\api\contract\v1\PaymentType":private]=>
NULL
["bankAccount":"net\authorize\api\contract\v1\PaymentType":private]=>
NULL
["trackData":"net\authorize\api\contract\v1\PaymentType":private]=>
NULL
["encryptedTrackData":"net\authorize\api\contract\v1\PaymentType":private]=>
NULL
["payPal":"net\authorize\api\contract\v1\PaymentType":private]=>
NULL
["opaqueData":"net\authorize\api\contract\v1\PaymentType":private]=>
object(net\authorize\api\contract\v1\OpaqueDataType)#1815 (4) {
["dataDescriptor":"net\authorize\api\contract\v1\OpaqueDataType":private]=>
string(27) "COMMON.ACCEPT.INAPP.PAYMENT"
["dataValue":"net\authorize\api\contract\v1\OpaqueDataType":private]=>
string(216) "**************************************************************************************************************************************************************************"
["dataKey":"net\authorize\api\contract\v1\OpaqueDataType":private]=>
NULL
["expirationTimeStamp":"net\authorize\api\contract\v1\OpaqueDataType":private]=>
NULL
}
["emv":"net\authorize\api\contract\v1\PaymentType":private]=>
NULL
["dataSource":"net\authorize\api\contract\v1\PaymentType":private]=>
NULL
}
["driversLicense":"net\authorize\api\contract\v1\CustomerPaymentProfileType":private]=>
NULL
["taxId":"net\authorize\api\contract\v1\CustomerPaymentProfileType":private]=>
NULL
["defaultPaymentProfile":"net\authorize\api\contract\v1\CustomerPaymentProfileType":private]=>
bool(true)
["customerType":"net\authorize\api\contract\v1\CustomerPaymentProfileBaseType":private]=>
string(10) "individual"
["billTo":"net\authorize\api\contract\v1\CustomerPaymentProfileBaseType":private]=>
object(net\authorize\api\contract\v1\CustomerAddressType)#1802 (11) {
["phoneNumber":"net\authorize\api\contract\v1\CustomerAddressType":private]=>
string(14) "(555) 555-5555"
["faxNumber":"net\authorize\api\contract\v1\CustomerAddressType":private]=>
NULL
["email":"net\authorize\api\contract\v1\CustomerAddressType":private]=>
NULL
["firstName":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(6) "*****"
["lastName":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(7) "*****"
["company":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
NULL
["address":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(24) "*****"
["city":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(13) "*****"
["state":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(2) "FL"
["zip":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(5) "33437"
["country":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(2) "US"
}
}
}
["shipToList":"net\authorize\api\contract\v1\CustomerProfileType":private]=>
array(1) {
[0]=>
object(net\authorize\api\contract\v1\CustomerAddressType)#1801 (11) {
["phoneNumber":"net\authorize\api\contract\v1\CustomerAddressType":private]=>
string(14) "(555) 555-5555"
["faxNumber":"net\authorize\api\contract\v1\CustomerAddressType":private]=>
NULL
["email":"net\authorize\api\contract\v1\CustomerAddressType":private]=>
NULL
["firstName":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(6) "*****"
["lastName":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(7) "*****"
["company":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
NULL
["address":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(29) "***** "
["city":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(14) "*****"
["state":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(2) "VA"
["zip":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(5) "23452"
["country":"net\authorize\api\contract\v1\NameAndAddressType":private]=>
string(2) "US"
}
}
["profileType":"net\authorize\api\contract\v1\CustomerProfileType":private]=>
NULL
["merchantCustomerId":"net\authorize\api\contract\v1\CustomerProfileBaseType":private]=>
NULL
["description":"net\authorize\api\contract\v1\CustomerProfileBaseType":private]=>
string(72) "Customer for *****@*****.com on *****.shop for Order #2548056"
["email":"net\authorize\api\contract\v1\CustomerProfileBaseType":private]=>
string(19) "*****@*****.com"
}
["validationMode":"net\authorize\api\contract\v1\CreateCustomerProfileRequest":private]=>
NULL
["merchantAuthentication":"net\authorize\api\contract\v1\ANetApiRequestType":private]=>
object(net\authorize\api\contract\v1\MerchantAuthenticationType)#1816 (9) {
["name":"net\authorize\api\contract\v1\MerchantAuthenticationType":private]=>
string(9) "*****"
["transactionKey":"net\authorize\api\contract\v1\MerchantAuthenticationType":private]=>
string(16) "*****"
["sessionToken":"net\authorize\api\contract\v1\MerchantAuthenticationType":private]=>
NULL
["password":"net\authorize\api\contract\v1\MerchantAuthenticationType":private]=>
NULL
["impersonationAuthentication":"net\authorize\api\contract\v1\MerchantAuthenticationType":private]=>
NULL
["fingerPrint":"net\authorize\api\contract\v1\MerchantAuthenticationType":private]=>
NULL
["clientKey":"net\authorize\api\contract\v1\MerchantAuthenticationType":private]=>
NULL
["accessToken":"net\authorize\api\contract\v1\MerchantAuthenticationType":private]=>
NULL
["mobileDeviceId":"net\authorize\api\contract\v1\MerchantAuthenticationType":private]=>
NULL
}
["clientId":"net\authorize\api\contract\v1\ANetApiRequestType":private]=>
string(13) "sdk-php-1.9.9"
["refId":"net\authorize\api\contract\v1\ANetApiRequestType":private]=>
string(13) "ref1683616545"
}
And here is my $response object:
object(net\authorize\api\contract\v1\CreateCustomerProfileResponse)#2081 (7) {
["customerProfileId":"net\authorize\api\contract\v1\CreateCustomerProfileResponse":private]=>
string(9) "911672929"
["customerPaymentProfileIdList":"net\authorize\api\contract\v1\CreateCustomerProfileResponse":private]=>
array(1) {
[0]=>
string(9) "911026658"
}
["customerShippingAddressIdList":"net\authorize\api\contract\v1\CreateCustomerProfileResponse":private]=>
array(1) {
[0]=>
string(9) "911715531"
}
["validationDirectResponseList":"net\authorize\api\contract\v1\CreateCustomerProfileResponse":private]=>
array(0) {
}
["refId":"net\authorize\api\contract\v1\ANetApiResponseType":private]=>
string(13) "ref1683616545"
["messages":"net\authorize\api\contract\v1\ANetApiResponseType":private]=>
object(net\authorize\api\contract\v1\MessagesType)#2077 (2) {
["resultCode":"net\authorize\api\contract\v1\MessagesType":private]=>
string(2) "Ok"
["message":"net\authorize\api\contract\v1\MessagesType":private]=>
array(1) {
[0]=>
object(net\authorize\api\contract\v1\MessagesType\MessageAType)#2093 (2) {
["code":"net\authorize\api\contract\v1\MessagesType\MessageAType":private]=>
string(6) "I00001"
["text":"net\authorize\api\contract\v1\MessagesType\MessageAType":private]=>
string(11) "Successful."
}
}
}
["sessionToken":"net\authorize\api\contract\v1\ANetApiResponseType":private]=>
NULL
}
array(1) {
[0]=>
object(net\authorize\api\contract\v1\MessagesType\MessageAType)#2093 (2) {
["code":"net\authorize\api\contract\v1\MessagesType\MessageAType":private]=>
string(6) "I00001"
["text":"net\authorize\api\contract\v1\MessagesType\MessageAType":private]=>
string(11) "Successful."
}
}
So I am at a loss. You can see the shipping address is in the $request, just before it is passed into
and the $response, shows it being successful.
I then go onto take the customer profile Id, and the paymentProfile, and use that to charge the card (that code isnt' included, but is straight forward). But after doing the charge, using the profile id and the payment profile, the shipping address is blank, both in the dashboard, and in the emails I receive from authorize.net. What is wrong here????
05-09-2023 02:02 PM
Same with me,
11-14-2024 11:48 PM
Me too, facing the same issue.
11-14-2024 11:52 PM