/** * Set shipping address * * @param array $A Array of info, such as from $_POST */ public function setShipping($A) { USES_paypal_class_userinfo(); if (isset($A['useaddress'])) { // If set, read and use an existing address $_SESSION[PP_CART_VAR]['shipping'] = $A['useaddress']; $A = ppUserInfo::getAddress($A['useaddress']); $prefix = ''; } else { // form vars have this prefix $prefix = 'shipto_'; } if (!empty($A)) { $this->shipto_name = $A['name']; $this->shipto_company = $A['company']; $this->shipto_address1 = $A['address1']; $this->shipto_address2 = $A['address2']; $this->shipto_city = $A['city']; $this->shipto_state = $A['state']; $this->shipto_country = $A['country']; $this->shipto_zip = $A['zip']; } }