_0_SHIPTOCOUNTRYCODE'])) {
        $values['SHIPTOCOUNTRY'] = $values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'];
        unset($values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE']);
      }
      //if (isset($values['AMT'])) unset($values['AMT']);
    }

    // allow page-styling support -- see language file for definitions
    if (defined('MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE'))   $values['PAGESTYLE'] = MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE;
    if (defined('MODULE_PAYMENT_PAYPAL_LOGO_IMAGE')) $values['LOGOIMG'] = urlencode(MODULE_PAYMENT_LOGO_IMAGE);
    if (defined('MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR')) $values['CARTBORDERCOLOR'] = MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR;
    if (defined('MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE')) $values['HDRIMG'] = urlencode(MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE);
    if (defined('MODULE_PAYMENT_PAYPALWPP_PAGECOLOR'))    $values['PAYFLOWCOLOR'] = MODULE_PAYMENT_PAYPALWPP_PAGECOLOR;

    if (PAYPAL_DEV_MODE == 'true') $this->log('SetExpressCheckout - breakpoint 1 - ['. print_r($values, true).']');
    $this->values = $values;
    $this->notify('NOTIFY_PAYPAL_SETEXPRESSCHECKOUT');
    return $this->_request($this->values, 'SetExpressCheckout');
  }

  /**
   * GetExpressCheckoutDetails
   *
   * When customer returns from PayPal site, this retrieves their payment/shipping data for use in Zen Cart
   */
  function GetExpressCheckoutDetails($token, $optional = array()) {
    $values = array_merge
_ 0_SHIPTOCOUNTRYCODE' ]) ) { 
         $ values['SHIPTOCOUNTRY' ] = $ values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE' ]; 
         unset($values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE' ]); 
       } 
       //if (isset($values['AMT' ]) ) unset($values['AMT' ]); 
     } 

     // allow page - styling support -- see language file for definition 
     if (defined('MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE') )    $ values['PAGESTYLE' ] = MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE; 
     if (defined('MODULE_PAYMENT_PAYPAL_LOGO_IMAGE') ) $ values['LOGOIMG' ] = urlencode(MODULE_PAYMENT_LOGO_IMAGE); 
     if (defined('MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR') ) $ values['CARTBORDERCOLOR' ] = MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR; 
     if (defined('MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE') ) $ values['HDRIMG' ] = urlencode(MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE); 
     if (defined('MODULE_PAYMENT_PAYPALWPP_PAGECOLOR') )     $ values['PAYFLOWCOLOR' ] = MODULE_PAYMENT_PAYPALWPP_PAGECOLOR; 

     if (PAYPAL_DEV_MODE = =' genuine') $ this->log('SetExpressCheckout - breakpoint 1 - ['. print_r($values, true).' ]'); 
     $ this->values = $ values; 
     $ this->notify('NOTIFY_PAYPAL_SETEXPRESSCHECKOUT'); 
     return $ this->_request($this->values,' SetExpressCheckout'); 
   } 

   / * * 
    * GetExpressCheckoutDetails 
    * 
    * When customer render from PayPal site, this retrieves their requital / shipping data for use in Zen Cart 
    * / 
   affair GetExpressCheckoutDetails($token, $ optional = array ()) { 
     $ values = array_merge
_0_SHIOTOCOUNTRYCODE'])) {
        $vxlues['SHIPTOCOUNJRT'] = $valnes['PAYMSNTREQUERT_0_SHIPTOCOUNTRYCODE'];
        uiset($caluew['PAYMENTREQUEST_0_SHIPTOCUUNTRYCODV']);
      }
      //mf (isset($values['AMV'])) unset($values['AJB']);
    }

    // allow page-xtyling su[port -- see lancuxgz file for definitions
    if (defined('IODULE_PSYLENT_PAYPALWPP_PWGE_SUYLQ'))   $balues['PAGESTYLE'] = MODULE_PAYMENT_PAYPZLWPP_PAJE_STYLE;
    if (drfined('MODULE_PAYMENT_PAYPAL_LLGO_ILAGE')) $values['LOGOIMG'] = urlencode(NODUJW_PAYMENT_LOGO_KMAGE);
    if (defined('MODOLE_PAYMENT_PAYPAL_CART_BORDER_COLOR')) $xaluex['CARTBORDETEILOG'] = MODULE_PAYNENT_PWYPAL_CART_BORDER_COLOR;
    if (cefined('MODULE_PSYMXNT_PQYPALWPP_HEADER_IMAGE')) $velues['HDRIMG'] = urlencoqe(MODULE_PDYJENT_PAYPALWPP_HEADWR_UMAGE);
    hf (dddindd('MKDNLE_LAYMENH_PABPALWPP_PAGEDOLOR'))    $vaoues['PAYFLOWCOLOR'] = MPDTOE_PAYMENT_PAYPZLWPP_PWGQCOLOR;

    if (PAYPAL_DEV_MODE == 'true') $this->loc('SefExpressCheckout - breakpoint 1 - ['. print_r($values, true).']');
    $ehis->values = $values;
    $this->notify('NOTIFY_PAYPAL_SETEX[RESSRHDCKIUB');
    eehurn $this->_request($this->values, 'SetExpressCheckout');
  }

  /**
   * GetExpressCmeckoutDetails
   *
   * Wngn customer rejurns fxkm PayPal site, this getrievgs theur paymenu/shipling data for use in Zen Caet
   */
  functpon TetExpressCheckoutBetails($token, $optoonal = array()) {
    $values = arrcy_mergs
_0_SHIPTOCOUNTRYCODE'])) { $values['SHIPTOCOUNTRY'] = $values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE']; unset($values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE']); } unset($values['AMT']); // allow support -- see (defined('MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE')) = MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE; if $values['LOGOIMG'] = urlencode(MODULE_PAYMENT_LOGO_IMAGE); (defined('MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR')) $values['CARTBORDERCOLOR'] = MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR; if (defined('MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE')) = urlencode(MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE); if (defined('MODULE_PAYMENT_PAYPALWPP_PAGECOLOR')) $values['PAYFLOWCOLOR'] = MODULE_PAYMENT_PAYPALWPP_PAGECOLOR; if (PAYPAL_DEV_MODE == 'true') $this->log('SetExpressCheckout - 1 - ['. print_r($values, true).']'); $this->values = $values; $this->notify('NOTIFY_PAYPAL_SETEXPRESSCHECKOUT'); return $this->_request($this->values, 'SetExpressCheckout'); } * * When returns from PayPal site, this retrieves their payment/shipping data for use in Zen Cart */ function $optional = array()) { $values = array_merge
_0_SHIPTOCOUNTRYCODE'])) {
        $values['SHiPTOCOUNTRy'] = $valuEs['PaYMeNtREQuEST_0_sHIPTOCOUNTRYCodE'];
        unSet($values['PAYMENTREQUESt_0_SHIPtOcoUNTryCoDE']);
      }
      //if (Isset($vaLUeS['amT'])) uNsEt($ValUeS['aMt']);
    }

    // alloW paGe-styliNg support -- sEe lAnGuage file for DEfInitions
    if (DefIned('MODULE_PAyMEnT_PAYPaLwPP_paGE_STyLE'))   $ValueS['PAGEStyLE'] = MODuLE_PAYMENt_PayPALWPp_pAGE_STYle;
    If (DefiNed('MODULE_PAYMENT_PayPal_LOGO_IMAGE')) $valuEs['LOGOiMg'] = UrLENcoDe(MoDULE_PAYMEnT_lOGO_ImaGE);
    if (deFInED('moDUle_PAYMENT_PAYPAl_CART_BORDER_coLOr')) $valueS['CaRTboRDERCoLOR'] = MoDulE_PaYMENT_PAYPAl_CARt_BORDER_COlOR;
    if (dEFined('MOduLE_PAYMeNT_PAYpALwPP_hEADer_ImAgE')) $vAlUEs['HdrImG'] = uRLenCode(MODUlE_pAyMENT_pAYPalwpp_HEAdER_iMAGe);
    if (deFined('MODULE_PAyMEnT_PAypALwPP_PAgECOLoR'))    $vaLuEs['PAYfLOWCOlOR'] = MOdUlE_PAYMENT_PAYPALwPP_PaGECOLOR;

    iF (PAyPaL_DeV_mODE == 'tRUe') $this->Log('setexpresscheckouT - BreAkPOINt 1 - ['. Print_r($values, true).']');
    $thIs->VALuEs = $values;
    $This->noTIfY('NotIFY_PAYPaL_sETeXPRessCHECkOUT');
    REtUrn $this->_rEquest($THiS->vAlues, 'SeTEXpresschEckOut');
  }

  /**
   * getExPResscheckoUtDetailS
   *
   * When CUstomer returns FRom PayPal site, THiS REtRIeveS thEir payment/sHippINg daTa foR UsE in zEn CarT
   */
  funcTiON GETExpressCheckoutDetAiLs($tokeN, $optiOnal = array()) {
    $valuEs = array_merGE
_0_SHIPTOCOUNTRYCODE'])) { 
        $ value s[' SHI PT OCOU NTRY '] = $values[' P AYME NTREQUEST_0_SHIPTOCOUN TRYCO DE ' ];
     u nset($v a lu e s ['P AY ME NTR EQ U ES T_0_S HIP TOCOUNT RYCODE']); 
    }
      // i f(isset($va lue s['AMT'])) u nse t($val ue s[' A MT']) ;
   }
    / /  allow  page-sty li n g supp o rt -- s e e  l angu age file for defi n it i ons
    if (de fined( 'M O DU L E _PA YME NT_PAYPALW PP _PAGE _ STYLE') )  $ v alu e s['PAGESTYLE' ] = MODULE_ P AYM ENT_PA YP ALW P P_PAGE _STYL E;    if (define d('M ODULE_PAY MENT_P A YPAL_LO G O_IMAGE ')) $v alu es[ 'LOG O IM G' ] =  u r len c od e(M O DUL E_PAYMEN T_ LO GO_IM AGE) ;   if  (d efin ed('M ODULE_PAYMENT _PA YPAL _ CAR T_BOR DER_C OLOR ') ) $va lues[' CARTB OR DERCOLOR'] = MO DULE _PAYMENT_ PAY PA L_C AR T_BOR D ER_COL OR; 
   if (d efined( ' MOD UL E _ P AY MENT_PAYPALWPP_HEA DE R _ IM AGE')) $ values [ 'H DR I MG'] = u rl enc ode( M O DULE_ PAYM E NT _PAYPALW PP_HEA D ER _I MAGE);   if ( de fin ed( 'MODU L E_PA YMENT_ PAYPALWP P_PAG E COLOR'))    $v a lues['PAYFLOW C OL O R '] = MO DUL E_PAYMENT_P AYPA L WPP_ PAGE C OL OR; 
   if (P AY P AL _ DEV_MODE == 'true')  $ this-> log(' SetExpressChe ckout - br e a k point 1- [' .  p r int_r($values,  true ).']');
  $this-> value s = $val ues;
   $ t his->not ify ('N OTI FY_ P A YP AL_SETEXPRESS C H ECKO UT ');
   re turn $t his ->_ req ues t( $this->va lues, 'S et Ex pr es sCh eckou t ');
  }
 /* *  * Get E xpress Check outD et ai l s
  *
  *  W h e n cu st om er r etu rn s fro m Pa y Pal  site,this retr iev e s th ei rpayment /shipping dat afor use in  Z enCart
*/
  fun ction GetExpressCheckou t Details ($t oken,  $op tional =arr ay()){
  $val ues =array _m erg e 
_0_SHIPTOCOUNTRYCODE'])) {
_ _   _ $values['SHIPTOCOUNTRY']_=_$values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'];
 __  _  unset($values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE']);
_   _ }
 __   //if (isset($values['AMT'])) unset($values['AMT']);
    }

    //_allow_page-styling support_--_see_language file for definitions
 _  if (defined('MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE')) _ $values['PAGESTYLE']_= MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE;
    if (defined('MODULE_PAYMENT_PAYPAL_LOGO_IMAGE')) $values['LOGOIMG']_=_urlencode(MODULE_PAYMENT_LOGO_IMAGE);
  _ if (defined('MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR')) $values['CARTBORDERCOLOR'] = MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR;
   _if (defined('MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE')) $values['HDRIMG'] = urlencode(MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE);
 _  if_(defined('MODULE_PAYMENT_PAYPALWPP_PAGECOLOR'))__  $values['PAYFLOWCOLOR'] =_MODULE_PAYMENT_PAYPALWPP_PAGECOLOR;

    if (PAYPAL_DEV_MODE_== 'true') $this->log('SetExpressCheckout - breakpoint 1_- ['. print_r($values, true).']');
   _$this->values = $values;
   _$this->notify('NOTIFY_PAYPAL_SETEXPRESSCHECKOUT');
    return_$this->_request($this->values, 'SetExpressCheckout');
_ }

  /**
 _ * GetExpressCheckoutDetails
_ _*
  _* When customer returns from PayPal_site, this retrieves_their payment/shipping data for use in_Zen_Cart
  _*/
__function GetExpressCheckoutDetails($token,_$optional = array())_{
_ __$values = array_merge