title: Error 10525 during express checkout in PayPal
body: <p>I have the following code (using the Yii PHP framework):</p>
  
  <pre><code>error_reporting(E_ALL ^ E_NOTICE);
  $libraryPath = Yii::getPathOfAlias('application.libraries.paypal');
  spl_autoload_unregister(array('YiiBase','autoload'));
  require_once($libraryPath . '/PPBootStrap.php');
  spl_autoload_register(array('YiiBase','autoload'));
  
  $PaymentDetails = new PaymentDetailsType();
  
  $address = new AddressType();
  $address-&gt;CityName = '';
  $address-&gt;Name = '';
  $address-&gt;Street1 = '';
  $address-&gt;StateOrProvince = '';
  $address-&gt;PostalCode = '';
  $address-&gt;Country = '';
  $address-&gt;Phone = '';
  
  $PaymentDetails-&gt;ShipToAddress = $address;
  
  $PaymentDetails-&gt;ShippingTotal = $PaymentDetails-&gt;HandlingTotal
    = $PaymentDetails-&gt;InsuranceTotal = $PaymentDetails-&gt;TaxTotal
    = new BasicAmountType('USD', 0);
  $PaymentDetails-&gt;OrderTotal =  $PaymentDetails-&gt;ItemTotal
    = new BasicAmountType('USD', $subscription-&gt;price);
  
  $PaymentDetails-&gt;PaymentAction = "Sale";
  
  $PaymentDetails-&gt;OrderDescription = $subscription-&gt;description;
  
  $setECReqDetails = new SetExpressCheckoutRequestDetailsType();
  $setECReqDetails-&gt;PaymentDetails[0] = $PaymentDetails;
  $setECReqDetails-&gt;CancelURL = $this-&gt;createAbsoluteUrl('adListing/listings');
  $setECReqDetails-&gt;ReturnURL = $this-&gt;createAbsoluteUrl('adReturnFromPaypal');
  
  $setECReqDetails-&gt;NoShipping = '0';
  $setECReqDetails-&gt;AddressOverride = '';
  $setECReqDetails-&gt;ReqConfirmShipping = '0';
  
  $setECReqType = new SetExpressCheckoutRequestType();
  $setECReqType-&gt;SetExpressCheckoutRequestDetails = $setECReqDetails;
  
  $setECReq = new SetExpressCheckoutReq();
  $setECReq-&gt;SetExpressCheckoutRequest = $setECReqType;
  
  $paypalService = new PayPalAPIInterfaceServiceService();
  
  $ok = TRUE;
  try {
    Yii::trace(__METHOD__ . ': Initiating PayPal API...');
    // wrap API method calls on the service object with a try catch
    $setECResponse = $paypalService-&gt;SetExpressCheckout($setECReq);
  
    if($setECResponse &amp;&amp; strtoupper($setECResponse-&gt;Ack) =='SUCCESS') {
      Yii::trace(__METHOD__ . ': Got successful response from PayPal. Redirecting to it...');
      $token = $setECResponse-&gt;Token;
      // Redirect to paypal.com here
      $this-&gt;redirect(
        'https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&amp;token=' . $token);
    }
  }
  catch (Exception $ex) {
    Yii::trace(__METHOD__ . ': Exception while interacting with PayPal API, error: '
      . $ex-&gt;getMessage());
    $ok = FALSE;
  }
  if (!$ok) {
    Yii::app()-&gt;user-&gt;setFlash('listings', array(
      'msg'=&gt;'There was an error while interacting with PayPal. Please try again later.',
      'class'=&gt;'flash-error'));
    $this-&gt;redirect(array('adListing/listings'));
  }
  </code></pre>
  
  <p>The user is redirected to Paypal, but when they login with their sandbox account and try to pay, I get a <strong>10525</strong> error from Paypal: </p>
  
  <blockquote>
    <p>This transaction cannot be processed. The amount to be charged is zero.</p>
  </blockquote>
  
  <p>And the checkout fails. Is there a property that I'm missing to set and the process fails?</p>