setAddressOverride() public method

Indicates whether to display the shipping address that is passed to this call rather than the one on file with PayPal for this buyer on the PayPal experience pages. Valid value is 0 or 1. Set to 0 to display the shipping address on file. Set to 1 to display the shipping address supplied to this call; the buyer cannot edit this shipping address.
public setAddressOverride ( integer $address_override )
$address_override integer
示例#1
0
 /**
  * Build WebProfile
  *
  * @return boolean|WebProfile
  */
 protected function buildWebProfile()
 {
     $webProfile = new WebProfile();
     if (Mage::getStoreConfig('iways_paypalplus/dev/web_profile_id')) {
         $webProfile->setId(Mage::getStoreConfig('iways_paypalplus/dev/web_profile_id'));
         return $webProfile;
     }
     try {
         $webProfile->setName('magento_' . microtime());
         $webProfile->setPresentation($this->buildWebProfilePresentation());
         $inputFields = new InputFields();
         $inputFields->setAddressOverride(1);
         $webProfile->setInputFields($inputFields);
         $response = $webProfile->create($this->_apiContext);
         $this->saveWebProfileId($response->getId());
         return $response;
     } catch (\PayPal\Exception\PayPalConnectionException $ex) {
         Mage::helper('iways_paypalplus')->handleException($ex);
     }
     return false;
 }