Support

Home Forums Event Espresso Premium EE4 How to get zip-code from Authorize.net AIM PAY_details

EE4 How to get zip-code from Authorize.net AIM PAY_details

Posted: August 23, 2017 at 2:21 pm


jmahan

August 23, 2017 at 2:21 pm

I need to build a CVS for demographic analysis containing Registration Authorize.net AIM PAY_details from wp_esp_payment. How can I get the zip-code?
I will likely create a PHP or CRON outside of EE4 to do the extract, so example code snippets will be most helpful.


Josh

  • Support Staff

August 23, 2017 at 3:25 pm

Assuming you use the $wpdb class to get the serialized data from the PAY_details field, your PHP code could look something like this:

$array = unserialize($array_from_PAY_details);
$var = $array['address_zip'];


jmahan

August 24, 2017 at 8:46 am

Josh,
The PAY_details content is an Object based on x-post response. Do you have any related PHP code examples? THX (SEE BELOW)

EE_AuthorizeNetAIM_Response Object
(
[_x_post_fields:protected] => Array
(
[version] => 3.1
[delim_char] => ,
[delim_data] => TRUE
[relay_response] => FALSE
[encap_char] => |
)

[approved] => 1
[declined] =>
[error] =>
[held] =>
[response_code] => 1
[response_subcode] => 1
[response_reason_code] => 1
[response_reason_text] => This transaction has been approved.
[authorization_code] => 252340
[avs_response] => Y
[transaction_id] => 60113360781
[invoice_number] => bZEZ3M7RmthB
[description] => Event Registrations from  for Amador Rose Park TastingMust be 21 To Attend, no outside alcohol.
Includes Friday wine tasting, logo wine glass and wine tasting the following day at the participating wineries.
NO REFUNDS AVAILABLE.
PLEASE PRINT AND BRING
[amount] => 50.00
[method] => CC
[transaction_type] => auth_capture
[customer_id] => 112
[first_name] => Danny
[last_name] => XXXXXXXX
[company] =>
[address] => YYYYYYYYY
[city] => Reno
[state] => Nevada
[zip_code] => 89519
[country] => United States
[phone] =>
[fax] =>
[email_address] => ZZZZZZZZ
[ship_to_first_name] =>
[ship_to_last_name] =>
[ship_to_company] =>
[ship_to_address] =>
[ship_to_city] =>
[ship_to_state] =>
[ship_to_zip_code] =>
[ship_to_country] =>
[tax] =>
[duty] =>
[freight] =>
[tax_exempt] =>
[purchase_order_number] =>
[md5_hash] => 941252DBEC720995B2FEFE824E3EF2AC
[card_code_response] => M
[cavv_response] =>
[account_number] =>
[card_type] => American Express
[split_tender_id] =>
[requested_amount] =>
[balance_on_card] =>
[response] => |1|,|1|,|1|,|This transaction has been approved.|,|252340|,|Y|,|60113360781|,|bZEZ3M7RmthB|,|Event Registrations from  for Amador Rose Park TastingMust be 21 To Attend, no outside alcohol.
Includes Friday wine tasting, logo wine glass and wine tasting the following day at the participating wineries.
NO REFUNDS AVAILABLE.
PLEASE PRINT AND BRING|,|50.00|,|CC|,|auth_capture|,|112|,|Danny|,|XXXX|,||,|YYYY|,|Reno|,|Nevada|,|89519|,|United


Josh

  • Support Staff

August 24, 2017 at 8:53 am

As you noted in your earlier comment, the PAY_details field is also in the wp_esp_payment table. We do not have any related PHP code examples beyond what’s already in the plugin.

The support post ‘EE4 How to get zip-code from Authorize.net AIM PAY_details’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso