/**
  * Build the NVP data array for submitting the current checkout to PayPal as an Authorization request
  *
  * @param SI_Checkouts $checkout
  * @return array
  */
 private function set_nvp_data(SI_Checkouts $checkout)
 {
     $invoice = $checkout->get_invoice();
     $client = $invoice->get_client();
     $user = si_who_is_paying($invoice);
     // User email or none
     $user_email = $user ? $user->user_email : '';
     $nvpData = array();
     $nvpData['USER'] = self::$api_username;
     $nvpData['PWD'] = self::$api_password;
     $nvpData['SIGNATURE'] = self::$api_signature;
     $nvpData['VERSION'] = self::$version;
     $nvpData['CANCELURL'] = self::$cancel_url;
     $nvpData['RETURNURL'] = $checkout->checkout_complete_url($this->get_slug());
     $nvpData['METHOD'] = 'SetExpressCheckout';
     $nvpData['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Authorization';
     $nvpData['EMAIL'] = $user_email;
     $nvpData['LANDINGPAGE'] = 'Billing';
     $nvpData['SOLUTIONTYPE'] = 'Sole';
     $payment_amount = si_has_invoice_deposit($invoice->get_id()) ? $invoice->get_deposit() : $invoice->get_balance();
     $nvpData['PAYMENTREQUEST_0_AMT'] = si_get_number_format($payment_amount);
     $nvpData['PAYMENTREQUEST_0_CURRENCYCODE'] = self::get_currency_code($invoice->get_id());
     $item_amount = si_has_invoice_deposit($invoice->get_id()) ? $invoice->get_deposit() : $invoice->get_balance() - ($invoice->get_tax_total() + $invoice->get_tax2_total());
     $nvpData['PAYMENTREQUEST_0_ITEMAMT'] = si_get_number_format($item_amount);
     // $nvpData['PAYMENTREQUEST_0_SHIPPINGAMT'] = si_get_number_format( $invoice->get_shipping_total() ); // FUTURE
     $tax_amount = si_has_invoice_deposit($invoice->get_id()) ? 0 : $invoice->get_tax_total() + $invoice->get_tax2_total();
     $nvpData['PAYMENTREQUEST_0_TAXAMT'] = si_get_number_format($tax_amount);
     $nvpData['BUTTONSOURCE'] = self::PLUGIN_NAME;
     $nvpData += self::payment_request_line_items($invoice);
     // Recurring billing agreement
     if (si_is_invoice_recurring($invoice)) {
         $nvpData['L_BILLINGTYPE0'] = 'RecurringPayments';
         $nvpData['L_BILLINGAGREEMENTDESCRIPTION0'] = $this->recurring_desc($invoice);
     }
     $nvpData = apply_filters('si_paypal_ec_set_nvp_data', $nvpData);
     do_action('si_log', __CLASS__ . '::' . __FUNCTION__ . ' - PayPal EC SetCheckout Data', $nvpData);
     return apply_filters('si_set_nvp_data', $nvpData, $checkout, $i);
 }