Changeset 2817

Show
Ignore:
Timestamp:
06/11/08 08:24:54 (3 months ago)
Author:
zombor
Message:

Fixing some bad paypal code.

Location:
trunk/system
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/config/payment.php

    r2322 r2817  
    8484$config['Paypal'] = array 
    8585( 
    86         'API_UserName' => '', 
    87         'API_Password' => '', 
    88         'API_Signature' => '', 
    89         'ReturnUrl' => '', 
    90         'CANCELURL' => '', 
    91         'CURRENCYCODE' => 'USD' 
     86        'USER'         => '-your-paypal-api-username', 
     87        'PWD'          => '-your-paypal-api-password', 
     88        'SIGNATURE'    => '-your-paypal-api-security-signiature', 
     89        'ENDPOINT'     => 'https://api-3t.paypal.com/nvp', 
     90 
     91        'RETURNURL'     => 'http://yoursite.com', 
     92        'CANCELURL'     => 'http://yoursite.com/canceled', 
     93 
     94        // -- sandbox authorization details are generic 
     95        'SANDBOX_USER'      => 'sdk-three_api1.sdk.com', 
     96        'SANDBOX_PWD'       => 'QFZCWN5HZM8VBG7Q', 
     97        'SANDBOX_SIGNATURE' => 'A.d9eRKfd1yVkRrtmMfCFLTqa6M9AyodL0SJkhYztxUi8W9pCXF6.4NI', 
     98        'SANDBOX_ENDPOINT'  => 'https://api-3t.sandbox.paypal.com/nvp', 
     99 
     100        'VERSION'      => '3.2', 
     101        'CURRENCYCODE' => 'USD', 
    92102); 
    93103 
  • trunk/system/libraries/drivers/Payment/Paypal.php

    r2593 r2817  
    3131                'RETURNURL'     => FALSE, 
    3232                'CANCELURL'     => FALSE, 
    33                 'PAYPALURL'     => FALSE, 
    34  
    35                 'PAYMENTACTION' => FALSE, 
    3633 
    3734                'CURRENCYCODE'  => FALSE, // default is USD - only required if other currency needed 
     
    5754                'CURRENCYCODE'  => '', // default is USD - only required if other currency needed 
    5855                'MAXAMT'        => '', 
    59  
    60                 'PAYMENTACTION' => '', // 'Sale', 'Authorization' or 'Order' see: https://www.paypal.com/en_US/ebook/PP_NVPAPI_DeveloperGuide/Appx_fieldreference.html#2557853 
    6156 
    6257                // USERACTION defaults to 'continue' 
     
    132127                'METHOD'        => 'DoExpressCheckoutPayment', 
    133128                'TOKEN'         => '', // this token is retrieved from the response to the setExpressCheckout call 
    134                 'PAYMENTACTION' => '', // 'Sale', 'Authorization' or 'Order' see: https://www.paypal.com/en_US/ebook/PP_NVPAPI_DeveloperGuide/Appx_fieldreference.html#2557853 
    135129                'PAYERID'       => '', 
    136130                'AMT'           => '', // payment amount - MUST include decimal point followed by two further digits 
     
    218212 
    219213                $this->test_mode = $config['test_mode']; 
     214                $this->api_connection_fields['PAYPALURL'] = 'https://www.paypal.com/webscr&cmd=_express-checkout&token='; 
    220215 
    221216                if ($this->test_mode) 
     
    226221 
    227222                        $this->api_connection_fields['ENDPOINT']     = $config['SANDBOX_ENDPOINT']; 
    228                         $this->api_connection_fields['PAYPALURL']    = $config['SANDBOX_PAYPALURL']; 
     223                        $this->api_connection_fields['PAYPALURL']    = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token='; 
    229224                } 
    230225 
     
    248243                        { 
    249244                                case 'amount': 
    250                                 $key = 'AMT'; 
    251                                 break; 
     245                                        $key = 'AMT'; 
     246                                        break; 
    252247                                default: 
    253248                        }