/phpPayPal.php
PHP | 2319 lines | 1622 code | 301 blank | 396 comment | 71 complexity | 145fdb527f4c2286ab6ac1503de3f225 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- <?php
- /*
- Created by Drew Johnston, 2007, drewjoh.com
-
- Please give credit where credit is due. :)
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- Get, Create and Update Recurring Payment Profiles available thanks to Bill Joslin (billjoslin.com)!
- */
- class phpPayPal {
-
- // ---------------------------
- // PRIVATE VARIABLES
- // ---------------------------
- // NOTE: LIVE and SANDBOX variables are included. Sandbox is enabled by default.
-
- private $sandbox = TRUE;
- private $live = FALSE;
-
- public $API_USERNAME = NULL;
- public $API_PASSWORD = NULL;
- public $API_SIGNATURE = NULL;
-
- private $API_ENDPOINT = NULL;
-
- public $USE_PROXY = NULL;
- public $PROXY_HOST = NULL;
- public $PROXY_PORT = NULL;
-
- private $PAYPAL_URL = NULL;
-
- public $return_url = NULL;
- public $cancel_url = NULL;
-
- public $VERSION = '3.0';
-
-
-
-
- // ----------------------------
- // PUBLIC VARIABLES
- // ----------------------------
-
- // Array of the response variables from PayPal requests
- public $Response;
-
- /* -------------------
- ERROR VARIABLES
- -------------------
- - $Error = an array of PayPal's response to any paypal errors
- - All $_error's = are filled for any error that occurs, including PayPal errors
- - If a method returns false, the $_error's should be filled with error information
- */
-
- // Array of the error response from PayPal - [TIMESTAMP] [CORRELATIONID] [ACK] [L_ERRORCODE0] [L_SHORTMESSAGE0] [L_LONGMESSAGE0] [L_SEVERITYCODE0] [VERSION] [BUILD]
- public $Error;
-
- public $_error = false;
- public $_error_ack;
- public $_error_type;
- public $_error_date;
- public $_error_code;
- public $_error_short_message;
- public $_error_long_message;
- public $_error_corrective_action;
- public $_error_severity_code;
- public $_error_version;
- public $_error_build;
- public $_error_display_message;
-
- /* ----------------------
- REQUEST VARIABLES
- ----------------------
- - All values found in a Request
- - Format is $our_variable_name; // PAYPALS_VARIABLE_NAME
- */
-
- public $payment_type = 'Sale'; // PAYMENTTYPE
-
- public $email; // EMAIL
- public $salutation; // SALUTATION
- public $first_name; // FIRSTNAME
- public $middle_name; // MIDDLENAME
- public $last_name; // LASTNAME
- public $suffix; // SUFFIX
- public $credit_card_type; // CREDITCARDTYPE --- Visa, MasterCard, Discover, Amex, Switch, Solo
- public $credit_card_number; // ACCT
- public $expire_date; // EXPDATE - MMYYYY
- public $cvv2_code; // CVV2
- public $address1; // STREET
- public $address2; // STREET2
- public $city; // CITY
- public $state; // STATE
- public $postal_code; // ZIP
- public $phone_number; // PHONENUM
-
- public $country_code; // COUNTRYCODE
-
- public $currency_code = "USD"; // CURRENCYCODE
-
- public $ip_address; //IPADDRESS
-
- public $amount_total; // AMT
- public $amount_shipping; // SHIPPINGAMT
- public $amount_handling; // HANDLINGAMT
- public $amount_tax; // TAXAMT
- public $amount_sales_tax; // SALESTAX - This is apparently only used with getTransactionDetails, and appears to be the same as amount_tax
- public $amount_items; // ITEMAMT
- public $amount_max; // MAXAMT
- public $amount_fee; // FEEAMT
- public $amount_settle; // SETTLEAMT
- public $amount_refund_net; // NETREFUNDAMT
- public $amount_refund_fee; // FEEREFUNDAMT
- public $amount_refund_total; // GROSSREFUNDAMT
-
- public $billing_type;
- public $billing_agreement;
-
- public $shipping_name; // SHIPTONAME
- public $shipping_address1; // SHIPTOSTREET
- public $shipping_address2; // SHIPTOSTREET2
- public $shipping_city; // SHIPTOCITY
- public $shipping_state; // SHIPTOSTATE
- public $shipping_postal_code; // SHIPTOZIP
- public $shipping_country_code; // SHIPTOCOUNTRYCODE
- public $shipping_country_name;
- public $shipping_phone_number; // SHIPTOPHONENUM
-
- public $description; // DESC
- public $custom; // CUSTOM
- public $invoice_number; // INVNUM
-
- public $note; // NOTE
-
- public $notify_url; // NOTIFYURL
- public $require_confirmed_shipping_address; // REQCONFIRMSHIPPING
- public $no_shipping; // NOSHIPPING
- public $address_override; // ADDROVERRIDE
- public $local_code; // LOCALECODE
- public $page_style; // PAGESTYLE
- public $hdr_image; // HDRIMG
- public $hdr_border_color; //HDRBORDERCOLOR
- public $hdr_back_color; // HDRBACKCOLOR
- public $payflow_color; // PAYFLOWCOLOR
- public $channel_type; // CHANNELTYPE
- public $solution_type; // SOLUTIONTYPE
- public $user_action; // USERACTION
-
- public $return_fmf_details = 0; // RETURNFMFDETAILS - 0 by default
-
- // Variables found in Authorize and Capture
-
- public $authorization_id; // AUTHORIZATIONID
- public $complete_type; // COMPLETETYPE
- public $soft_descriptor; // SOFTDESCRIPTOR
- public $transaction_entity; // TRANSACTIONENTITY
-
-
- // Variables that are returned to us
-
- public $ack;
- public $token; // TOKEN
- public $payer_id; // PAYERID
- public $payer_status; // PAYERSTATUS
- public $payer_business; // PAYERBUSINESS
- public $address_owner; // ADDRESSOWNER
- public $address_status; // ADDRESSSTATUS
- public $address_id;
- public $business; // BUSINESS
-
- public $avs_code;
- public $cvv2_match;
-
- public $transaction_id; // TRANSACTIONID
- public $parent_transaction_id; // PARENTTRANSACTIONID
- public $refund_transaction_id; // REFUNDTRANSACTIONID
- public $transaction_type; // TRANSACTIONTYPE
- public $payment_status; // PAYMENTSTATUS
- public $payment_pending_reason; // PENDINGREASON
- public $payment_reason_code; // REASONCODE
- public $order_time; // ORDERTIME
- public $timestamp;
-
- public $exchange_rate; // EXCHANGERATE
-
- public $receipt_id; // RECEIPTID
-
- public $receiver_business; // RECEIVERBUSINESS
- public $receiver_email; // RECEIVEREMAIL
- public $receiver_id; // RECEIVERID
-
- public $subscription_id; // SUBSCRIPTIONID
- public $subscription_date; // SUBSCRIPTIONDATE
- public $effective_date; // EFFECTIVEDATE
- public $retry_time; // RETRYTIME
- public $user_name; // USERNAME
- public $password; // PASSWORD
- public $recurrences; // RECURRENCES
- public $reattempt; // REATTEMPT
- public $recurring; // RECURRING
- public $period; // PERIOD
- public $buyer_id; // BUYERID
- public $closing_date; // CLOSINGDATE
- public $multi_item; // MULTIITEM
-
- public $refund_type; // REFUNDTYPE
-
- // Other
-
- public $build;
- public $version;
- public $correlation_id;
-
- /*
- This is the Items array, contains KEY => VALUE pairs for NAME => VALUE of items where NAME = name of item variable
- Names include: name, number, quantity, amount_tax, amount_total
- */
- public $ItemsArray;
-
-
- /* -----------------------
- COUNTRY NAMES & CODES
- -----------------------
- - This is an array of country names and their country codes
- - Organized in CODE => NAME format ($countries[COUNTRY_CODE] = COUNTRY_NAME)
- - This is purely for informational purposes, the class itself doesn't use these.
- - PayPal does use the country CODES when sending address information; can come in very handy then.
- - List should include all countries that PayPal accepts payments from.
- */
-
- public $countries = array ("US"=>"United States","AL"=>"Albania","DZ"=>"Algeria","AS"=>"American Samoa","AD"=>"Andorra","AI"=>"Anguilla","AG"=>"Antigua and Barbuda","AR"=>"Argentina","AM"=>"Armenia","AW"=>"Aruba","AU"=>"Australia","AT"=>"Austria","AZ"=>"Azerbaijan Republic","BS"=>"Bahamas","BH"=>"Bahrain","BD"=>"Bangladesh","BB"=>"Barbados","BY"=>"Belarus","BE"=>"Belgium","BZ"=>"Belize","BJ"=>"Benin","BM"=>"Bermuda","BO"=>"Bolivia","BA"=>"Bosnia and Herzegovina","BW"=>"Botswana","BR"=>"Brazil","VG"=>"British Virgin Islands","BN"=>"Brunei","BG"=>"Bulgaria","BF"=>"Burkina Faso","KH"=>"Cambodia","CM"=>"Cameroon","CA"=>"Canada","CV"=>"Cape Verde","KY"=>"Cayman Islands","CL"=>"Chile","C2"=>"China","CO"=>"Colombia","CK"=>"Cook Islands","CR"=>"Costa Rica","CI"=>"Cote D'Ivoire","HR"=>"Croatia","CY"=>"Cyprus","CZ"=>"Czech Republic","DK"=>"Denmark","DJ"=>"Djibouti","DM"=>"Dominica","DO"=>"Dominican Republic","TP"=>"East Timor","EC"=>"Ecuador","EG"=>"Egypt","SV"=>"El Salvador","EE"=>"Estonia","FM"=>"Federated States of Micronesia","FJ"=>"Fiji","FI"=>"Finland","FR"=>"France","GF"=>"French Guiana","PF"=>"French Polynesia","GA"=>"Gabon Republic","GE"=>"Georgia","DE"=>"Germany","GH"=>"Ghana","GI"=>"Gibraltar","GR"=>"Greece","GD"=>"Grenada","GP"=>"Guadeloupe","GU"=>"Guam","GT"=>"Guatemala","GN"=>"Guinea","GY"=>"Guyana","HT"=>"Haiti","HN"=>"Honduras","HK"=>"Hong Kong","HU"=>"Hungary","IS"=>"Iceland","IN"=>"India","ID"=>"Indonesia","IE"=>"Ireland","IL"=>"Israel","IT"=>"Italy","JM"=>"Jamaica","JP"=>"Japan","JO"=>"Jordan","KZ"=>"Kazakhstan","KE"=>"Kenya","KW"=>"Kuwait","LA"=>"Laos","LV"=>"Latvia","LB"=>"Lebanon","LS"=>"Lesotho","LT"=>"Lithuania","LU"=>"Luxembourg","MO"=>"Macau","MK"=>"Macedonia","MG"=>"Madagascar","MY"=>"Malaysia","MV"=>"Maldives","ML"=>"Mali","MT"=>"Malta","MH"=>"Marshall Islands","MQ"=>"Martinique","MU"=>"Mauritius","MX"=>"Mexico","MD"=>"Moldova","MN"=>"Mongolia","MS"=>"Montserrat","MA"=>"Morocco","MZ"=>"Mozambique","NA"=>"Namibia","NP"=>"Nepal","NL"=>"Netherlands","AN"=>"Netherlands Antilles","NZ"=>"New Zealand","NI"=>"Nicaragua","MP"=>"Northern Mariana Islands","NO"=>"Norway","OM"=>"Oman","PK"=>"Pakistan","PW"=>"Palau","PS"=>"Palestine","PA"=>"Panama","PG"=>"Papua New Guinea","PY"=>"Paraguay","PE"=>"Peru","PH"=>"Philippines","PL"=>"Poland","PT"=>"Portugal","PR"=>"Puerto Rico","QA"=>"Qatar","RO"=>"Romania","RU"=>"Russia","RW"=>"Rwanda","VC"=>"Saint Vincent and the Grenadines","WS"=>"Samoa","SA"=>"Saudi Arabia","SN"=>"Senegal","CS"=>"Serbia and Montenegro","SC"=>"Seychelles","SG"=>"Singapore","SK"=>"Slovakia","SI"=>"Slovenia","SB"=>"Solomon Islands","ZA"=>"South Africa","KR"=>"South Korea","ES"=>"Spain","LK"=>"Sri Lanka","KN"=>"St. Kitts and Nevis","LC"=>"St. Lucia","SZ"=>"Swaziland","SE"=>"Sweden","CH"=>"Switzerland","TW"=>"Taiwan","TZ"=>"Tanzania","TH"=>"Thailand","TG"=>"Togo","TO"=>"Tonga","TT"=>"Trinidad and Tobago","TN"=>"Tunisia","TR"=>"Turkey","TM"=>"Turkmenistan","TC"=>"Turks and Caicos Islands","UG"=>"Uganda","UA"=>"Ukraine","AE"=>"United Arab Emirates","GB"=>"United Kingdom","UY"=>"Uruguay","UZ"=>"Uzbekistan","VU"=>"Vanuatu","VE"=>"Venezuela","VN"=>"Vietnam","VI"=>"Virgin Islands (USA)","YE"=>"Yemen","ZM"=>"Zambia");
-
-
- /* --------------------
- STATES
- --------------------
- - States for certain countries, many of these are required formats for PayPal
- - Multidimensional array
- - $states[COUNTRY_CODE][STATE_CODE] = STATE_NAME
- */
-
- public $states = array(
- 'US' => array ("AK"=>"AK","AL"=>"AL","AR"=>"AR","AZ"=>"AZ","CA"=>"CA","CO"=>"CO","CT"=>"CT","DC"=>"DC","DE"=>"DE","FL"=>"FL","GA"=>"GA","HI"=>"HI",
- "IA"=>"IA","ID"=>"ID","IL"=>"IL","IN"=>"IN","KS"=>"KS","KY"=>"KY","LA"=>"LA","MA"=>"MA","MD"=>"MD","ME"=>"ME","MI"=>"MI","MN"=>"MN",
- "MO"=>"MO","MS"=>"MS","MT"=>"MT","NC"=>"NC","ND"=>"ND","NE"=>"NE","NH"=>"NH","NJ"=>"NJ","NM"=>"NM","NV"=>"NV","NY"=>"NY","OH"=>"OH",
- "OK"=>"OK","OR"=>"OR","PA"=>"PA","RI"=>"RI","SC"=>"SC","SD"=>"SD","TN"=>"TN","TX"=>"TX","UT"=>"UT","VA"=>"VA","VT"=>"VT","WA"=>"WA",
- "WI"=>"WI","WV"=>"WV","WY"=>"WY","AA"=>"AA","AE"=>"AE","AP"=>"AP","AS"=>"AS","FM"=>"FM","GU"=>"GU","MH"=>"MH","MP"=>"MP","PR"=>"PR",
- "PW"=>"PW","VI"=>"VI")
- ,
- 'CA' => array ("AB"=>"Alberta", "BC"=>"British Columbia", "MB"=>"Manitoba", "NB"=>"New Brunswick", "NL"=>"Newfoundland", "NS"=>"Nova Scotia",
- "NU"=>"Nunavut", "NT"=>"Northwest Territories", "ON"=>"Ontario", "PE"=>"Prince Edward Island", "QC"=>"Quebec", "SK"=>"Saskatchewan",
- "YT"=>"Yukon")
- ,
- 'AU' => array ("Australian Capital Territory"=>"Australian Capital Territory","New South Wales"=>"New South Wales","Northern Territory"=>"Northern Territory",
- "Queensland"=>"Queensland","South Australia"=>"South Australia","Tasmania"=>"Tasmania","Victoria"=>"Victoria","Western Australia"=>"Western Australia")
- ,
- 'GB' => array ("Aberdeen City"=>"Aberdeen City","Aberdeenshire"=>"Aberdeenshire","Angus"=>"Angus","Antrim"=>"Antrim","Argyll and Bute"=>"Argyll and Bute",
- "Armagh"=>"Armagh","Avon"=>"Avon","Bedfordshire"=>"Bedfordshire","Berkshire"=>"Berkshire","Blaenau Gwent"=>"Blaenau Gwent","Borders"=>"Borders",
- "Bridgend"=>"Bridgend","Bristol"=>"Bristol","Buckinghamshire"=>"Buckinghamshire","Caerphilly"=>"Caerphilly","Cambridgeshire"=>"Cambridgeshire",
- "Cardiff"=>"Cardiff","Carmarthenshire"=>"Carmarthenshire","Ceredigion"=>"Ceredigion","Channel Islands"=>"Channel Islands","Cheshire"=>"Cheshire",
- "Clackmannan"=>"Clackmannan","Cleveland"=>"Cleveland","Conwy"=>"Conwy","Cornwall"=>"Cornwall","Cumbria"=>"Cumbria","Denbighshire"=>"Denbighshire",
- "Derbyshire"=>"Derbyshire","Devon"=>"Devon","Dorset"=>"Dorset","Down"=>"Down","Dumfries and Galloway"=>"Dumfries and Galloway","Durham"=>"Durham",
- "East Ayrshire"=>"East Ayrshire","East Dunbartonshire"=>"East Dunbartonshire","East Lothian"=>"East Lothian","East Renfrewshire"=>"East Renfrewshire",
- "East Riding of Yorkshire"=>"East Riding of Yorkshire","East Sussex"=>"East Sussex","Edinburgh City"=>"Edinburgh City","Essex"=>"Essex",
- "Falkirk"=>"Falkirk","Fermanagh"=>"Fermanagh","Fife"=>"Fife","Flintshire"=>"Flintshire","Glasgow"=>"Glasgow","Gloucestershire"=>"Gloucestershire",
- "Greater Manchester"=>"Greater Manchester","Gwynedd"=>"Gwynedd","Hampshire"=>"Hampshire","Herefordshire"=>"Herefordshire",
- "Hertfordshire"=>"Hertfordshire","Highland"=>"Highland","Humberside"=>"Humberside","Inverclyde"=>"Inverclyde","Isle of Anglesey"=>"Isle of Anglesey",
- "Isle of Man"=>"Isle of Man","Isle of Wight"=>"Isle of Wight","Isles of Scilly"=>"Isles of Scilly","Kent"=>"Kent","Lancashire"=>"Lancashire",
- "Leicestershire"=>"Leicestershire","Lincolnshire"=>"Lincolnshire","London"=>"London","Londonderry"=>"Londonderry","Merseyside"=>"Merseyside",
- "Merthyr Tydfil"=>"Merthyr Tydfil","Middlesex"=>"Middlesex","Midlothian"=>"Midlothian","Monmouthshire"=>"Monmouthshire","Moray"=>"Moray",
- "Neath Port Talbot"=>"Neath Port Talbot","Newport"=>"Newport","Norfolk"=>"Norfolk","North Ayrshire"=>"North Ayrshire",
- "North Lanarkshire"=>"North Lanarkshire","North Yorkshire"=>"North Yorkshire","Northamptonshire"=>"Northamptonshire","Northumberland"=>"Northumberland",
- "Nottinghamshire"=>"Nottinghamshire","Orkney"=>"Orkney","Oxfordshire"=>"Oxfordshire","Pembrokeshire"=>"Pembrokeshire",
- "Perthshire and Kinross"=>"Perthshire and Kinross","Powys"=>"Powys","Renfrewshire"=>"Renfrewshire","Rhondda Cynon Taff"=>"Rhondda Cynon Taff",
- "Rutland"=>"Rutland","Shetland"=>"Shetland","Shropshire"=>"Shropshire","Somerset"=>"Somerset","South Ayrshire"=>"South Ayrshire",
- "South Lanarkshire"=>"South Lanarkshire","South Yorkshire"=>"South Yorkshire","Staffordshire"=>"Staffordshire","Stirling"=>"Stirling",
- "Suffolk"=>"Suffolk","Surrey"=>"Surrey","Swansea"=>"Swansea","The Vale of Glamorgan"=>"The Vale of Glamorgan","Tofaen"=>"Tofaen",
- "Tyne and Wear"=>"Tyne and Wear","Tyrone"=>"Tyrone","Warwickshire"=>"Warwickshire","West Dunbartonshire"=>"West Dunbartonshire",
- "West Lothian"=>"West Lothian","West Midlands"=>"West Midlands","West Sussex"=>"West Sussex","West Yorkshire"=>"West Yorkshire",
- "Western Isles"=>"Western Isles","Wiltshire"=>"Wiltshire","Worcestershire"=>"Worcestershire","Wrexham"=>"Wrexham")
- ,
- 'ES' => array ("Alava" => "Alava", "Albacete" => "Albacete", "Alicante" => "Alicante", "Almeria" => "Almeria", "Asturias" => "Asturias",
- "Avila" => "Avila", "Badajoz" => "Badajoz", "Barcelona" => "Barcelona", "Burgos" => "Burgos", "Caceres" => "Caceres",
- "Cadiz" => "Cadiz", "Cantabria" => "Cantabria", "Castellon" => "Castellon", "Ceuta" => "Ceuta", "Ciudad Real" => "Ciudad Real",
- "Cordoba" => "Cordoba", "Cuenca" => "Cuenca", "Guadalajara" => "Guadalajara", "Gerona" => "Gerona", "Granada" => "Granada",
- "Guipuzcoa" => "Guipuzcoa", "Huelva" => "Huelva", "Huesca" => "Huesca", "Islas Baleares" => "Islas Baleares", "Jaen" => "Jaen",
- "La Coruna" => "La Coruna", "Las Palmas" => "Las Palmas", "La Rioja" => "La Rioja", "Leon" => "Leon", "Lerida" => "Lerida",
- "Lugo" => "Lugo", "Madrid" => "Madrid", "Malaga" => "Malaga", "Melilla" => "Melilla", "Murcia" => "Murcia", "Navarra" => "Navarra",
- "Orense" => "Orense", "Palencia" => "Palencia", "Pontevedra" => "Pontevedra", "Salamanca" => "Salamanca",
- "Santa Cruz de Tenerife" => "Santa Cruz de Tenerife", "Segovia" => "Segovia", "Sevilla" => "Sevilla", "Soria" => "Soria",
- "Tarragona" => "Tarragona", "Teruel" => "Teruel", "Toledo" => "Toledo", "Valencia" => "Valencia", "Valladolid" => "Valladolid",
- "Vizcaya" => "Vizcaya", "Zamora" => "Zamora", "Zaragoza" => "Zaragoza")
- );
-
-
-
- // ----------------------------
- // Internal Use Varibles
- // ----------------------------
-
-
- /* -----------------------------------------
- AVS Response Code Values and Meanings
- -----------------------------------------
- - $AvsResponseCodesArray[CODE][MESSAGE]
- - $AvsResponseCodesArray[CODE][DETAILS]
- */
- public $AvsResponseCodesArray = array (
- 'A' => array('message' => 'Address', 'details' => 'Address Only (no ZIP)'),
- 'B' => array('message' => 'International "A"', 'details' => 'Address Only (no ZIP)'),
- 'C' => array('message' => 'International "N"', 'details' => 'None - The transaction is declined.'),
- 'D' => array('message' => 'International "X"', 'details' => 'Address and Postal Code'),
- 'E' => array('message' => 'Not Allowed for MOTO (Internet/Phone) transactions', 'details' => 'Not applicable - The transaction is declined.'),
- 'F' => array('message' => 'UK-Specific "X"', 'details' => 'Address and Postal Code'),
- 'G' => array('message' => 'Global Unavailable', 'details' => 'Not applicable'),
- 'I' => array('message' => 'International Unavailable', 'details' => 'Not applicable'),
- 'N' => array('message' => 'No', 'details' => 'None - The transaction is declined.'),
- 'P' => array('message' => 'Postal (International "Z")', 'details' => 'Postal Code only (no Address)'),
- 'R' => array('message' => 'Retry', 'details' => 'Not Applicable'),
- 'S' => array('message' => 'Service Not Supported', 'details' => 'Not Applicable'),
- 'U' => array('message' => 'Unavailable', 'details' => 'Not Applicable'),
- 'W' => array('message' => 'Whole ZIP', 'details' => 'Nine-digit ZIP code (no Address)'),
- 'X' => array('message' => 'Exact Match', 'details' => 'Address and nine-digit ZIP code'),
- 'Y' => array('message' => 'Yes', 'details' => 'Address and five-digit ZIP'),
- 'Z' => array('message' => 'ZIP', 'details' => 'Five-digit ZIP code (no Address)'),
- '' => array('message' => 'Error', 'details' => 'Not Applicable')
- );
-
- /* ---------------------------------------
- CVV Rsponse Code Values and Meanings
- ---------------------------------------
- - $CvvResponseCodesArray[CODE][MESSAGE]
- - $CvvResponseCodesArray[CODE][DETAILS]
- */
- public $CvvResponseCodesArray = array (
- 'M' => array('message' => 'Match', 'details' => 'CVV2'),
- 'N' => array('message' => 'No Match', 'details' => 'None'),
- 'P' => array('message' => 'Not Processed', 'details' => 'Not Applicable'),
- 'S' => array('message' => 'Service not supported', 'details' => 'Not Applicable'),
- 'U' => array('message' => 'Service not available', 'details' => 'Not Applicable'),
- 'X' => array('message' => 'No response', 'details' => 'Not Applicable')
- );
-
- /* ---------------------------------------
- CVV Rsponse Code Values and Meanings for Switch and Solo cards
- ---------------------------------------
- - TODO: ??
- */
-
-
-
- /* --------------------------------------------
- REQUEST FIELDS ARRAYS
- --------------------------------------------
- */
-
- public $RequestFieldsArray = array(
- 'DoCapture' => array(
- 'authorization_id' => array('name' =>'AUTHORIZATIONID', 'required' => 'yes'),
- 'amount' => array('name' =>'AMT', 'required' => 'yes'),
- 'currency_code' => array('name' =>'CURRENCYCODE', 'required' => 'no'),
- 'complete_type' => array('name' =>'COMPLETETYPE', 'required' => 'yes'),
- 'invoice_number' => array('name' =>'INVNUM', 'required' => 'no'),
- 'note' => array('name' =>'NOTE', 'required' => 'no'),
- 'soft_descriptor' => array('name' =>'SOFTDESCRIPTOR', 'required' => 'no')
- ),
- 'DoAuthorization' => array(
- 'transaction_id' => array('name' =>'TRANSACTIONID', 'required' => 'yes'),
- 'amount' => array('name' =>'AMT', 'required' => 'yes'),
- 'transaction_entity' => array('name' =>'TRANSACTIONENTITY', 'required' => 'no'),
- 'currency_code' => array('name' =>'CURRENCYCODE', 'required' => 'no')
- ),
- 'DoReauthorization' => array(
- 'authorization_id' => array('name' =>'AUTHORIZATIONID', 'required' => 'yes'),
- 'amount' => array('name' =>'AMT', 'required' => 'yes')
- ),
- 'DoVoid' => array(
- 'authorization_id' => array('name' =>'AUTHORIZATIONID', 'required' => 'yes'),
- 'note' => array('name' =>'NOTE', 'required' => 'no')
- ),
- 'DoDirectPayment' => array(
- 'payment_type' => array('name' => 'PAYMENTACTION', 'required' => 'yes'),
- 'ip_address' => array('name' => 'IPADDRESS', 'required' => 'yes'),
- 'return_fmf_details' => array('name' => 'RETURNFMFDETAILS', 'required' => 'no'),
- 'amount_total' => array('name' => 'AMT', 'required' => 'yes'),
- 'credit_card_type' => array('name' => 'CREDITCARDTYPE', 'required' => 'yes'),
- 'credit_card_number' => array('name' => 'ACCT', 'required' => 'yes'),
- 'expire_date' => array('name' => 'EXPDATE', 'required' => 'yes'),
- 'first_name' => array('name' => 'FIRSTNAME', 'required' => 'yes'),
- 'last_name' => array('name' => 'LASTNAME', 'required' => 'yes'),
- 'address1' => array('name' => 'STREET', 'required' => 'no'),
- 'address2' => array('name' => 'STREET2', 'required' => 'no'),
- 'city' => array('name' => 'CITY', 'required' => 'no'),
- 'state' => array('name' => 'STATE', 'required' => 'no'),
- 'country_code' => array('name' => 'COUNTRYCODE', 'required' => 'no'),
- 'postal_code' => array('name' => 'ZIP', 'required' => 'no'),
- 'notify_url' => array('name' => 'NOTIFYURL', 'required' => 'no'),
- 'currency_code' => array('name' => 'CURRENCYCODE', 'required' => 'no'),
- 'amount_items' => array('name' => 'ITEMAMT', 'required' => 'no'),
- 'amount_shipping' => array('name' => 'SHIPPINGAMT', 'required' => 'no'),
- 'amount_handling' => array('name' => 'HANDLINGAMT', 'required' => 'no'),
- 'amount_tax' => array('name' => 'TAXAMT', 'required' => 'no'),
- 'description' => array('name' => 'DESC', 'required' => 'no'),
- 'custom' => array('name' => 'CUSTOM', 'required' => 'no'),
- 'invoice_number' => array('name' => 'INVNUM', 'required' => 'no'),
- 'cvv2_code' => array('name' => 'CVV2', 'required' => 'yes'),
- 'start_date' => array('name' => 'STARTDATE', 'required' => 'no'), // For Maestro/Solo cards
- 'issue_number' => array('name' => 'ISSUENUMBER', 'required' => 'no'), // For maestro/Solo Cards
- 'email' => array('name' => 'EMAIL', 'required' => 'no'),
- 'phone_number' => array('name' => 'PHONENUM', 'required' => 'no'),
- 'shipping_name' => array('name' => 'SHIPTONAME', 'required' => 'no'),
- 'shipping_address1' => array('name' => 'SHIPTOSTREET', 'required' => 'no'),
- 'shipping_address2' => array('name' => 'SHIPTOSTREET2', 'required' => 'no'),
- 'shipping_city' => array('name' => 'SHIPTOCITY', 'required' => 'no'),
- 'shipping_state' => array('name' => 'SHIPTOSTATE', 'required' => 'no'),
- 'shipping_postal_code' => array('name' => 'SHIPTOZIP', 'required' => 'no'),
- 'shipping_country_code' => array('name' => 'SHIPTOCOUNTRYCODE', 'required' => 'no'),
- 'shipping_phone_number' => array('name' => 'SHIPTOPHONENUM', 'required' => 'no')
- ),
- 'SetExpressCheckout' => array(
- 'return_url' => array('name' => 'RETURNURL', 'required' => 'yes'),
- 'cancel_url' => array('name' => 'CANCELURL', 'required' => 'yes'),
- 'amount_total' => array('name' => 'AMT', 'required' => 'yes'),
- 'currency_code' => array('name' => 'CURRENCYCODE', 'required' => 'no'),
- 'amount_max' => array('name' => 'MAXAMT', 'required' => 'no'),
- 'payment_type' => array('name' => 'PAYMENTACTION', 'required' => 'no'),
- 'email' => array('name' => 'EMAIL', 'required' => 'no'),
- 'description' => array('name' => 'DESC', 'required' => 'no'),
- 'custom' => array('name' => 'CUSTOM', 'required' => 'no'),
- 'invoice_number' => array('name' => 'INVNUM', 'required' => 'no'),
- 'phone_number' => array('name' => 'PHONENUM', 'required' => 'no'),
- 'shipping_name' => array('name' => 'SHIPTONAME', 'required' => 'no'),
- 'shipping_address1' => array('name' => 'SHIPTOSTREET', 'required' => 'no'),
- 'shipping_address2' => array('name' => 'SHIPTOSTREET2', 'required' => 'no'),
- 'shipping_city' => array('name' => 'SHIPTOCITY', 'required' => 'no'),
- 'shipping_state' => array('name' => 'SHIPTOSTATE', 'required' => 'no'),
- 'shipping_postal_code' => array('name' => 'SHIPTOZIP', 'required' => 'no'),
- 'shipping_country_code' => array('name' => 'SHIPTOCOUNTRYCODE', 'required' => 'no'),
- 'shipping_phone_number' => array('name' => 'SHIPTOPHONENUM', 'required' => 'no'),
- 'require_confirmed_shipping_address' => array('name' => 'REQCONFIRMSHIPPING', 'required' => 'no'),
- 'no_shipping' => array('name' => 'NOSHIPPING', 'required' => 'no'),
- 'address_override' => array('name' => 'ADDROVERRIDE', 'required' => 'no'),
- 'token' => array('name' => 'TOKEN', 'required' => 'no'),
- 'locale_code' => array('name' => 'LOCALECODE', 'required' => 'no'),
- 'page_style' => array('name' => 'PAGESTYLE', 'required' => 'no'),
- 'hdr_img' => array('name' => 'HDRIMG', 'required' => 'no'),
- 'hdr_border_color' => array('name' => 'HDRBORDERCOLOR', 'required' => 'no'),
- 'hdr_background_color' => array('name' => 'HDRBACKCOLOR', 'required' => 'no'),
- 'payflow_color' => array('name' => 'PAYFLOWCOLOR', 'required' => 'no'),
- 'user_action' => array('name' => 'USERACTION', 'required' => 'no'),
- 'channel_type' => array('name' => 'CHANNELTYPE', 'required' => 'no'),
- 'solution_type' => array('name' => 'SOLUTIONTYPE', 'required' => 'no') ,
- 'billing_type' => array('name' => 'L_BILLINGTYPE0', 'required' => 'no'),
- 'billing_agreement' => array('name' => 'L_BILLINGAGREEMENTDESCRIPTION0', 'required' => 'no')
- ),
- 'GetExpressCheckoutDetails' => array(
- 'token' => array('name' => 'TOKEN', 'required' => 'yes')
- ),
- 'DoExpressCheckoutPayment' => array(
- 'token' => array('name' => 'TOKEN', 'required' => 'yes'),
- 'payment_type' => array('name' => 'PAYMENTACTION', 'required' => 'yes'),
- 'payer_id' => array('name' => 'PAYERID', 'required' => 'yes'),
- 'amount_total' => array('name' => 'AMT', 'required' => 'yes'),
- 'description' => array('name' => 'DESC', 'required' => 'no'),
- 'custom' => array('name' => 'CUSTOM', 'required' => 'no'),
- 'invoice_number' => array('name' => 'INVNUM', 'required' => 'no'),
- 'notify_url' => array('name' => 'NOTIFYURL', 'required' => 'no'),
- 'amount_items' => array('name' => 'ITEMAMT', 'required' => 'no'),
- 'amount_shipping' => array('name' => 'SHIPPINGAMT', 'required' => 'no'),
- 'amount_handling' => array('name' => 'HANDLINGAMT', 'required' => 'no'),
- 'amount_tax' => array('name' => 'TAXAMT', 'required' => 'no'),
- 'currency_code' => array('name' => 'CURRENCYCODE', 'required' => 'no'),
- 'shipping_name' => array('name' => 'SHIPTONAME', 'required' => 'no'),
- 'shipping_address1' => array('name' => 'SHIPTOSTREET', 'required' => 'no'),
- 'shipping_address2' => array('name' => 'SHIPTOSTREET2', 'required' => 'no'),
- 'shipping_city' => array('name' => 'SHIPTOCITY', 'required' => 'no'),
- 'shipping_state' => array('name' => 'SHIPTOSTATE', 'required' => 'no'),
- 'shipping_postal_code' => array('name' => 'SHIPTOZIP', 'required' => 'no'),
- 'shipping_country_code' => array('name' => 'SHIPTOCOUNTRYCODE', 'required' => 'no'),
- 'shipping_phone_number' => array('name' => 'SHIPTOPHONENUM', 'required' => 'no')
- ),
- 'GetTransactionDetails' => array(
- 'transaction_id' => array('name' => 'TRANSACTIONID', 'required' => 'yes')
- ),
- 'RefundTransaction' => array(
- 'transaction_id' => array('name' => 'TRANSACTIONID', 'required' => 'yes'),
- 'refund_type' => array('name' => 'REFUNDTYPE', 'required' => 'yes'),
- 'amount_total' => array('name' => 'AMT', 'required' => 'no'),
- 'note' => array('name' => 'NOTE', 'required' => 'no'),
- ),
- 'CreateRecurringPaymentsProfile' => array(
- 'token' => array('name' => 'TOKEN', 'required' => 'yes'),
- 'payer_id' => array('name' => 'PAYERID', 'required' => 'yes'),
- 'email' => array('name' => 'EMAIL', 'required' => 'yes'),
- 'country_code' => array('name' => 'COUNTRYCODE', 'required' => 'no'),
- 'business' => array('name' => 'BUSINESS', 'required' => 'no'),
- 'payer_status' => array('name' => 'PAYERSTATUS', 'required' => 'no'),
- 'subscriber_name' => array('name' => 'SUBSCRIBERNAME', 'required' => 'yes'),
- 'profile_reference' => array('name' => 'PROFILEREFERENCE', 'required' => 'yes'),
- 'credit_card_type' => array('name' => 'CREDITCARDTYPE', 'required' => 'yes'),
- 'credit_card_number' => array('name' => 'ACCT', 'required' => 'yes'),
- 'expire_date' => array('name' => 'EXPDATE', 'required' => 'yes'),
- 'first_name' => array('name' => 'FIRSTNAME', 'required' => 'yes'),
- 'last_name' => array('name' => 'LASTNAME', 'required' => 'yes'),
- 'address1' => array('name' => 'STREET', 'required' => 'no'),
- 'address2' => array('name' => 'STREET2', 'required' => 'no'),
- 'city' => array('name' => 'CITY', 'required' => 'no'),
- 'state' => array('name' => 'STATE', 'required' => 'no'),
- 'country_code' => array('name' => 'COUNTRYCODE', 'required' => 'no'),
- 'postal_code' => array('name' => 'ZIP', 'required' => 'no'),
-
- 'shipping_name' => array('name' => 'SHIPTONAME', 'required' => 'no'),
- 'shipping_address1' => array('name' => 'SHIPTOSTREET', 'required' => 'no'),
- 'shipping_address2' => array('name' => 'SHIPTOSTREET2', 'required' => 'no'),
- 'shipping_city' => array('name' => 'SHIPTOCITY', 'required' => 'no'),
- 'shipping_state' => array('name' => 'SHIPTOSTATE', 'required' => 'no'),
- 'shipping_postal_code' => array('name' => 'SHIPTOZIP', 'required' => 'no'),
- 'shipping_country_code' => array('name' => 'SHIPTOCOUNTRYCODE', 'required' => 'no'),
- 'shipping_phone_number' => array('name' => 'SHIPTOPHONENUM', 'required' => 'no'),
-
- 'description' => array('name' => 'DESC', 'required' => 'yes'), // You must match the billing agreement var in set Express checkout
- 'currency' => array('name' => 'CURRENCYCODE', 'required' => 'yes'),
- 'payment_type' => array('name' => 'PAYMENTACTION', 'required' => 'yes'),
- 'billing_type' => array('name' => 'L_BILLINGTYPE0', 'required' => 'yes'),
- 'billing_agreement' => array('name' => 'L_BILLINGAGREEMENTDESCRIPTION0', 'required' => 'yes'),
- 'profile_start_date' => array('name' => 'PROFILESTARTDATE', 'required' => 'yes'),
- 'billing_period' => array('name' => 'BILLINGPERIOD', 'required' => 'yes'), // Day Week Month SemiMonth Year
- 'billing_frequency' => array('name' => 'BILLINGFREQUENCY', 'required' => 'yes'),
- 'billing_amount' => array('name' => 'AMT', 'required' => 'yes'),
- 'tax_amount' => array('name' => 'TAXAMT', 'required' => 'yes'),
- 'ship_amount' => array('name' => 'SHIPPINGAMT', 'required' => 'yes'),
- 'inital_amount' => array('name' => 'INITAMT', 'required' => 'no'),
- 'failed_inital_amount' => array('name' => 'FAILEDINITAMTACTION', 'required' => 'no'),
- 'billing_total_cycles' => array('name' => 'TOTALBILLINGCYCLES', 'required' => 'no'),
- 'trial_billing_period' => array('name' => 'TRIALBILLINGPERIOD', 'required' => 'no'),
- 'trial_billing_frequency' => array('name' => 'TRIALBILLINGFREQUENCY', 'required' => 'no'),
- 'trial_amount' => array('name' => 'TRIALAMT', 'required' => 'no'),
- 'trial_billing_cycle' => array('name' => 'TRIALTOTALBILLINGCYCLES', 'required' => 'no'),
- 'max_failed_attempts' => array('name' => 'MAXFAILEDPAYMENTS', 'required' => 'no'),
- 'auto_bill_amt' => array('name' => 'AUTOBILLOUTAMT', 'required' => 'no')
- ),
- 'UpdateRecurringPaymentsProfile' => array(
- 'profile_id' => array('name' => 'PROFILEID', 'required' => 'yes'),
- 'note' => array('name' => 'NOTE', 'required' => 'no'),
- 'description' => array('name' => 'DESC', 'required' => 'no'),
- 'subscriber_name' => array('name' => 'SUBSCRIBERNAME', 'required' => 'no'),
- 'profile_reference' => array('name' => 'PROFILEREFERENCE', 'required' => 'no'),
- 'additional_billing_cycles' => array('name' => 'ADDITIONALBILLINGCYCLES', 'required' => 'no'),
- 'amount' => array('name' => 'AMT', 'required' => 'yes'),
- 'shipping_amount' => array('name' => 'SHIPPINGAMT', 'required' => 'no'),
- 'tax_amount' => array('name' => 'TAXAMT', 'required' => 'no'),
- 'outstanding_amount' => array('name' => 'OUTSTANDINGAMT', 'required' => 'no'),
- 'auto_bill_out' => array('name' => 'AUTOBILLOUTAMT', 'required' => 'no'),
- 'max_failed_payments' => array('name' => 'MAXFAILEDPAYMENTS', 'required' => 'no'),
- 'profile_start_date' => array('name' => 'PROFILESTARTDATE' , 'required' => 'no'),
- 'ship_to_name' => array('name' => 'SHIPTONAME', 'required' => 'no'),
- 'ship_to_street' => array('name' => 'SHIPTOSTREET', 'required' => 'no'),
- 'ship_to_street_2' => array('name' => 'SHIPTOSTREET2', 'required' => 'no'),
- 'ship_to_city' => array('name' => 'SHIPTOCITY', 'required' => 'no'),
- 'ship_to_province' => array('name' => 'SHIPTOSTATE', 'required' => 'no'),
- 'ship_to_postal_code' => array('name' => 'SHIPTOZIP', 'required' => 'no'),
- 'ship_to_country' => array('name' => 'SHIPTOCOUNTRY', 'required' => 'no'),
- 'ship_to_phone_number' => array('name' => 'SHIPTOPHONENUM', 'required' => 'no'),
- 'billing_period' => array('name' => 'BILLINGPERIOD', 'required' => 'yes'),
- 'billing_frequency' => array('name' => 'BILLINGFREQUENCY', 'required' => 'yes'),
- 'total_billing_cycles' => array('name' => 'TOTALBILLINGCYCLES', 'required' => 'no'),
- 'trial_billing_period' => array('name' => 'TRIALBILLINGPERIOD', 'required' => 'no'),
- 'trial_billing_frequnecy' => array('name' => 'TRIALBILLINGFREQUENCY', 'required' => 'no'),
- 'trial_total_cycles' => array('name' => 'TRIALTOTALBILLINGCYCLES', 'required' => 'no'),
- 'trial_amount' => array('name' => 'TRIALAMT', 'required' => 'no'),
- 'currency' => array('name' => 'CURRENCYCODE', 'required' => 'yes'),
- 'shipping_amount' => array('name' => 'SHIPPINGAMT', 'required' => 'no'),
- 'tax_amount' => array('name' => 'TAXAMT', 'required' => 'no'),
- 'credit_card_type' => array('name' => 'CREDITCARDTYPE', 'required' => 'no'),
- 'credit_card_number' => array('name' => 'ACCT', 'required' => 'no'),
- 'expiration_date' => array('name' => 'EXPDATE', 'required' => 'no'),
- 'cvv2' => array('name' => 'CVV2', 'required' => 'no'),
- 'start_date' => array('name' => 'STARTDATE', 'required' => 'no'),
- 'email' => array('name' => 'EMAIL', 'required' => 'no'),
- 'first_name' => array('name' => 'FIRSTNAME', 'required' => 'no'),
- 'last_name' => array('name' => 'LASTNAME', 'required' => 'no'),
- 'street' => array('name' => 'STREET', 'required' => 'yes'),
- 'street2' => array('name' => 'STREET2', 'required' => 'no'),
- 'city' => array('name' => 'CITY', 'required' => 'yes'),
- 'province' => array('name' => 'STATE', 'required' => 'yes'),
- 'country_code' => array('name' => 'COUNTRYCODE', 'required' => 'yes'),
- 'postal_code' => array('name' => 'ZIP', 'required' => 'yes'),
- 'phone_number' => array('name' => 'PHONENUM', 'required' => 'no')
- ),
- 'DoReferenceTransaction' => array(
- 'reference_id' => array('name' => 'REFERENCEID', 'required' => 'yes'),
- 'payment_type' => array('name' => 'PAYMENTACTION', 'required' => 'yes'),
- 'return_fmf_details' => array('name' => 'RETURNFMFDETAILS', 'required' => 'no'),
- 'soft_descriptor' => array('name' => 'SOFTDESCRIPTOR', 'required' => 'no'),
- 'ship_to_name' => array('name' => 'SHIPTONAME', 'required' => 'no'),
- 'ship_to_street' => array('name' => 'SHIPTOSTREET', 'required' => 'no'),
- 'ship_to_street_2' => array('name' => 'SHIPTOSTREET2', 'required' => 'no'),
- 'ship_to_city' => array('name' => 'SHIPTOCITY', 'required' => 'no'),
- 'ship_to_province' => array('name' => 'SHIPTOSTATE', 'required' => 'no'),
- 'ship_to_postal_code' => array('name' => 'SHIPTOZIP', 'required' => 'no'),
- 'ship_to_country' => array('name' => 'SHIPTOCOUNTRY', 'required' => 'no'),
- 'ship_to_phone_number' => array('name' => 'SHIPTOPHONENUM', 'required' => 'no'),
- 'billing_period' => array('name' => 'BILLINGPERIOD', 'required' => 'yes'),
- 'billing_frequency' => array('name' => 'BILLINGFREQUENCY', 'required' => 'yes'),
- 'phone_number' => array('name' => 'PHONENUM', 'required' => 'no'),
- 'amount_total' => array('name' => 'AMT', 'required' => 'yes'),
- 'currency_code' => array('name' => 'CURRENCYCODE', 'required' => 'no'),
- 'amount_items' => array('name' => 'ITEMAMT', 'required' => 'no'),
- 'amount_shipping' => array('name' => 'SHIPPINGAMT', 'required' => 'no'),
- 'amount_handling' => array('name' => 'HANDLINGAMT', 'required' => 'no'),
- 'amount_tax' => array('name' => 'TAXAMT', 'required' => 'no'),
- 'description' => array('name' => 'DESC', 'required' => 'no'),
- 'custom' => array('name' => 'CUSTOM', 'required' => 'no'),
- 'invoice_number' => array('name' => 'INVNUM', 'required' => 'no'),
- 'button_source' => array('name' => 'BUTTONSOURCE', 'required' => 'no'),
- 'notify_url' => array('name' => 'NOTIFYURL', 'required' => 'no'),
- 'credit_card_type' => array('name' => 'CREDITCARDTYPE', 'required' => 'no'),
- 'credit_card_number' => array('name' => 'ACCT', 'required' => 'no'),
- 'cvv2_code' => array('name' => 'CVV2', 'required' => 'yes'),
- 'expire_date' => array('name' => 'EXPDATE', 'required' => 'no'),
- 'start_date' => array('name' => 'STARTDATE', 'required' => 'no'), // For Maestro/Solo cards
- 'issue_number' => array('name' => 'ISSUENUMBER', 'required' => 'no'), // For maestro/Solo Cards
- 'email' => array('name' => 'EMAIL', 'required' => 'no'),
- 'first_name' => array('name' => 'FIRSTNAME', 'required' => 'no'),
- 'last_name' => array('name' => 'LASTNAME', 'required' => 'no'),
- 'address1' => array('name' => 'STREET', 'required' => 'no'),
- 'address2' => array('name' => 'STREET2', 'required' => 'no'),
- 'city' => array('name' => 'CITY', 'required' => 'no'),
- 'state' => array('name' => 'STATE', 'required' => 'no'),
- 'country_code' => array('name' => 'COUNTRYCODE', 'required' => 'no'),
- 'postal_code' => array('name' => 'ZIP', 'required' => 'no')
- )
- );
-
-
- public $ResponseFieldsArray = array(
- 'DoCapture' => array(
- 'authorization_id' => 'AUTHORIZATIONID',
- 'email' => 'EMAIL',
- 'payer_id' => 'PAYERID',
- 'payer_status' => 'PAYERSTATUS',
- 'country_code' => 'COUNTRYCODE',
- 'business' => 'BUSINESS',
- 'address_status' => 'ADDRESSSTATUS',
- 'shipping_name' => 'SHIPTONAME',
- 'shipping_address1' => 'SHIPTOSTREET',
- 'shipping_address2' => 'SHIPTOSTREET2',
- 'shipping_city' => 'SHIPTOCITY',
- 'shipping_state' => 'SHIPTOSTATE',
- 'shipping_postal_code' => 'SHIPTOZIP',
- 'shipping_country_code' => 'SHIPTOCOUNTRYCODE',
- 'salutation' => 'SALUTATION',
- 'first_name' => 'FIRSTNAME',
- 'middle_name' => 'MIDDLENAME',
- 'last_name' => 'LASTNAME',
- 'suffix' => 'SUFFIX'
- ),
- 'DoAuthorization' => array(
- 'transaction_id' => 'TRANSACTIONID',
- 'amount' => 'AMT'
- ),
- 'DoReauthorization' => array(
- 'authorization_id' => 'AUTHORIZATIONID'
- ),
- 'DoVoid' => array(
- 'authorization_id' => 'AUTHORIZATIONID'
- ),
- 'DoDirectPayment' => array(
- 'timestamp' => 'TIMESTAMP',
- 'correlation_id' => 'CORRELATIONID',
- 'ack' => 'ACK',
- 'version' => 'VERSION',
- 'build' => 'BUILD',
- 'avs_code' => 'AVSCODE',
- 'cvv2_match' => 'CVV2MATCH',
- 'transaction_id' => 'TRANSACTIONID',
- 'amount_total' => 'AMT',
- 'currency_code' => 'CURRENCYCODE'
- )
- ,
- 'SetExpressCheckout' => array(
- 'timestamp' => 'TIMESTAMP',
- 'correlation_id' => 'CORRELATIONID',
- 'ack' => 'ACK',
- 'version' => 'VERSION',
- 'build' => 'BUILD',
- 'token' => 'TOKEN'
- )
- ,
- 'DoExpressCheckoutPayment' => array(
- 'timestamp' => 'TIMESTAMP',
- 'correlation_id' => 'CORRELATIONID',
- 'ack' => 'ACK',
- 'version' => 'VERSION',
- 'build' => 'BUILD',
- 'token' => 'TOKEN',
- 'transaction_id' => 'TRANSACTIONID',
- 'transaction_type' => 'TRANSACTIONTYPE',
- 'payment_type' => 'PAYMENTTYPE',
- 'order_time' => 'ORDERTIME',
- 'amount_total' => 'AMT',
- 'currency_code' => 'CURRENCYCODE',
- 'amount_fee' => 'FEEAMT',
- 'amount_settle' => 'SETTLEAMT',
- 'amount_tax' => 'TAXAMT',
- 'exchange_rate' => 'EXCHANGERATE',
- 'payment_status' => 'PAYMENTSTATUS',
- 'payment_pending_reason'=> 'PENDINGREASON',
- 'payment_reason_code' => 'REASONCODE'
- )
- ,
- 'GetExpressCheckoutDetails' => array(
- 'timestamp' => 'TIMESTAMP',
- 'correlation_id' => 'CORRELATIONID',
- 'ack' => 'ACK',
- 'version' => 'VERSION',
- 'build' => 'BUILD',
- 'token' => 'TOKEN',
- 'email' => 'EMAIL',
- 'payer_id' => 'PAYERID',
- 'payer_status' => 'PAYERSTATUS',
- 'salutation' => 'SALUTATION',
- 'first_name' => 'FIRSTNAME',
- 'middle_name' => 'MIDDLENAME',
- 'last_name' => 'LASTNAME',
- 'suffix' => 'SUFFIX',
- 'country_code' => 'COUNTRYCODE',
- 'business' => 'BUSINESS',
- 'shipping_name' => 'SHIPTONAME',
- 'shipping_address1' => 'SHIPTOSTREET',
- 'shipping_address2' => 'SHIPTOSTREET2',
- 'shipping_city' => 'SHIPTOCITY',
- 'shipping_state' => 'SHIPTOSTATE',
- 'shipping_country_code' => 'SHIPTOCOUNTRYCODE',
- 'shipping_country_name' => 'SHIPTOCOUNTRYNAME',
- 'shipping_postal_code' => 'SHIPTOZIP',
- 'address_id' => 'ADDRESSID', // Is this a returned variable? Some docs say yes, some no
- 'address_status' => 'ADDRESSSTATUS',
- 'description' => 'DESC',
- 'custom' => 'CUSTOM',
- 'phone_number' => 'PHONENUM'
- )
- ,
- 'GetTransactionDetails' => array(
- 'timestamp' => 'TIMESTAMP',
- 'correlation_id' => 'CORRELATIONID',
- 'ack' => 'ACK',
- 'version' => 'VERSION',
- 'build' => 'BUILD',
- 'receiver_business' => 'RECEIVERBUSINESS',
- 'receiver_email' => 'RECEIVEREMAIL',
- 'receiver_id' => 'RECEIVERID',
- 'email' => 'EMAIL',
- 'payer_id' => 'PAYERID',
- 'payer_status' => 'PAYERSTATUS',
- 'salutation' => 'SALUTATION',
- 'first_name' => 'FIRSTNAME',
- 'last_name' => 'LASTNAME',
- 'middle_name' => 'MIDDLENAME',
- 'suffix' => 'SUFFIX',
- 'payer_business' => 'PAYERBUSINESS',
- 'country_code' => 'COUNTRYCODE',
- 'business' => 'BUSINESS',
- 'shipping_name' => 'SHIPTONAME',
- 'shipping_address1' => 'SHIPTOSTREET',
- 'shipping_address2' => 'SHIPTOSTREET2',
- 'shipping_city' => 'SHIPTOCITY',
- 'shipping_state' => 'SHIPTOSTATE',
- 'shipping_country_code' => 'SHIPTOCOUNTRYCODE',
- 'shipping_country_name' => 'SHIPTOCOUNTRYNAME',
- 'shipping_postal_code' => 'SHIPTOZIP',
- 'address_id' => 'ADDRESSID', // Is this a returned variable? Some docs say yes, some no
- 'address_status' => 'ADDRESSSTATUS',
- 'address_owner' => 'ADDRESSOWNER',
- 'parent_transaction_id' => 'PARENTTRANSACTIONID',
- 'transaction_id' => 'TRANSACTIONID',
- 'receipt_id' => 'RECEIPTID',
- 'transaction_type' => 'TRANSACTIONTYPE',
- 'payment_type' => 'PAYMENTTYPE',
- 'order_time' => 'ORDERTIME',
- 'amount_total' => 'AMT',
- 'currency_code' => 'CURRENCYCODE',
- 'amount_fee' => 'FEEAMT',
- 'amount_settle' => 'SETTLEAMT',
- 'amount_tax' => 'TAXAMT',
- 'exchange_rate' => 'EXCHANGERATE',
- 'payment_status' => 'PAYMENTSTATUS',
- 'payment_pending_reason' => 'PENDINGREASON',
- 'payment_reason_code' => 'REASONCODE',
- 'amount_sales_tax' => 'SALESTAX',
- 'invoice_number' => 'INVNUM',
- 'note' => 'NOTE',
- 'custom' => 'CUSTOM',
- 'subscription_id' => 'SUBSCRIPTIONID',
- 'subscription_date' => 'SUBSCRIPTIONDATE',
- 'effective_date' => 'EFFECTIVEDATE',
- 'retry_time' => 'RETRYTIME',
- 'user_name' => 'USERNAME',
- 'recurrences' => 'RECURRENCES',
- 'reattempt' => 'REATTEMPT',
- 'recurring' => 'RECURRING',
- 'period' => 'PERIOD',
- 'buyer_id' => 'BUYERID',
- 'closing_date' => 'CLOSINGDATE',
- 'multi_item' => 'MULTIITEM'
- )
- ,
- 'RefundTransaction' => array(
- 'refund_transaction_id' => 'REFUNDTRANSACTIONID',
- 'amount_refund_net' => 'NETFUNDAMT',
- 'amount_refund_fee' => 'FEEREFUNDAMT',
- 'amount_refund_total' => 'GROSSREFUNDAMT'
- ),
- 'CreateRecurringPaymentsProfile' => array(
- 'profile_id' => 'PROFILEID',
- 'status' => 'STATUS'
- ),
- 'UpdateRecurringPaymentsProfile' => array(
- 'profile_id' => 'PROFILEID',
- ),
- 'GetRecurringPaymentsProfileDetails' => array(
- 'profile_id' => 'PROFILEID',
- 'status' => 'STATUS',
- 'auto_bill_out' => 'AUTOBILLOUTAMT',
- 'description' => 'DESC',
- 'max_failed_payments' => 'MAXFAILEDPAYMENTS',
- 'subcriber_name' => 'SUBSCRIBERNAME',
- 'profile_start_date' => 'PROFILESTARTDATE',
- 'nest_billing_date' => 'NEXTBILLINGDATE',
- 'num_cycles_completed' => 'NUMCYCLESCOMPLETED',
- 'num_cycles_remaining' => 'NUMCYCLESREMAINING',
- 'outstanding_balance' => 'OUTSTANDINGBALANCE',
- 'failed_billing_account'=> 'FAILEDPAYMENTCOUNT',
- 'trial_amount_paid' => 'TRIALAMTPAID',
- 'regular_amount_paid' => 'REGULARAMTPAID',
- 'aggregate_amount' => 'AGGREGATEAMT',
- 'aggregate_option_amount' => 'AGGREGATEOPTIONALAMT',
- 'final_payment_due_date' => 'FINALPAYMENTDUEDATE',
- 'time_stamp' => 'TIMESTAMP',
- 'correlation_id' => 'CORRELATIONID',
- 'ack' => 'ACK',
- 'version' => 'VERSION',
- 'build' => 'BUILD',
- 'ship_to_street' => 'SHIPTOSTREET',
- 'ship_to_street2' => 'SHIPTOSTREET2',
- 'ship_to_city' => 'SHIPTOCITY',
- 'ship_to_province' => 'SHIPTOSTATE',
- 'ship_to_postalcode' => 'SHIPTOZIP',
- 'ship_to_country_code' => 'SHIPTOCOUNTRYCODE',
- 'ship_to_country' => 'SHIPTOCOUNTRY',
- 'ship_to_country_name' => 'SHIPTOCOUNTRYNAME',
- 'ship_address_owner' => 'SHIPADDRESSOWNER',
- 'ship_address_status' => 'SHIPADDRESSSTATUS',
- 'billing_period' => 'BILLINGPERIOD',
- 'billing_frequency' => 'BILLINGFREQUENCY',
- 'total_biling_cycles' => 'TOTALBILLINGCYCLES',
- 'currency' => 'CURRENCYCODE',
- 'amount' => 'AMT',
- 'shipping_amount' => 'SHIPPINGAMT',
- 'tax_amount' => 'TAXAMT',
- 'regualar_billing_period' => 'REGULARBILLINGPERIOD',
- 'regular_billing_frequency' => 'REGULARBILLINGFREQUENCY',
- 'regular_billing_cycles' => 'REGULARTOTALBILLINGCYCLES',
- 'regular_currency' => 'REGULARCURRENCYCODE',
- 'regular_amount' => 'REGULARAMT',
- 'regular_shipping_amount' => 'REGULARSHIPPINGAMT',
- 'regular_tax_amount' => 'REGULARTAXAMT',
- 'credit_card_num' => 'ACCT',
- 'credit_card_type' => 'CREDITCARDTYPE',
- 'expiration_date' => 'EXPDATE',
- 'email' => 'EMAIL',
- 'first_name' => 'FIRSTNAME',
- 'last_name' => 'LASTNAME',
- 'street' => 'STREET',
- 'street2' => 'STREET2',
- 'city' => 'CITY',
- 'state' => 'STATE',
- 'postal_code' => 'ZIP',
- 'country_code' => 'COUNTRYCODE',
- 'country' => 'COUNTRY',
- 'address_owner' => 'ADDRESSOWNER',
- 'address_status' => 'ADDRESSSTATUS',
- 'payer_status' => 'PAYERSTATUS'
- ),
- 'DoReferenceTransaction' => array(
- 'avs_code' => 'AVSCODE',
- 'cvv2_match' => 'AVV2MATCH',
- 'billing_agreement_id' => 'BILLINGAGREEMENTID', // Should include filter ID…
Large files files are truncated, but you can click here to view the full file