Jump to content

Search the Community

Showing results for tags 'expres checkout for mobiles'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I need to add parameters to include a telephone number option and a url option for the purchaser to enter when making a purchase with the below mobile website checkout script, i need to know how and where to add the parameters, I have tried a few options but with out success, Any help would be much appreciated, <?php require_once 'PaypalMobile.php'; require_once 'Curl.php'; $paypal = new PaypalMobile(); /** * configuration for both sandbox and live NVP */ $config['env'] = 'dev'; if ($config['env'] != 'live') { $config['paypal']['api']['user'] = ''; $config['paypal']['api']['pass'] = ''; $config['paypal']['api']['signature'] = ''; $config['paypal']['api']['endpoint'] = 'https://api-3t.paypal.com/nvp'; $config['paypal']['api']['url'] = 'https://mobile.paypal.com/wc?t='; } else { $config['paypal']['api']['user'] = ''; $config['paypal']['api']['pass'] = ''; $config['paypal']['api']['signature'] = ''; $config['paypal']['api']['endpoint'] = 'https://api-3t.paypal.com/nvp'; $config['paypal']['api']['url'] = 'https://mobile.paypal.com/wc?t='; } $config['paypal']['api']['version'] = '3.0'; /** * give our library our config */ $paypal->setApiVersion($config['paypal']['api']['version']) ->setApiUrl($config['paypal']['api']['endpoint']) ->setApiUser($config['paypal']['api']['user']) ->setApiPass($config['paypal']['api']['pass']) ->setApiSignature($config['paypal']['api']['signature']); // SetMobileChechout if (!isset($_REQUEST['token']) || $_REQUEST['token'] == '') { /** * Optional params * * $params['email'] = ''; // email to propagate the login page with * $params['phonenum'] = ''; // phone number to propagate the login page with * $params['taxamt'] = ''; // tax * $params['shippingamt'] = ''; // shipping * $params['number'] = ''; // internal item number * $params['custom'] = ''; // internal returned data * $params['invnum'] = ''; // unique invoice number * $params['addressdisplay'] = '0'; // 1|0 require address * $params['sharephonenum'] = '1'; // 1|0 return customers mobile number * $params['shiptocity'] = ''; // city to propogate address form with * $params['shiptostate'] = ''; // state to propogate the address form with * $params['shiptocountry'] = ''; // country to propogate the address form with * $params['shiptozip'] = ''; // zip to propogate the address form with */ $response = $paypal->setAmt('0.50') ->setCurrencycode('GBP') ->setDesc('Mobile Website Design') ->setReturnurl('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']) ->setCancelurl('http://') ->setMobileCheckout($params); if ($paypal->getResponseStatus()) { /** * forward user off to paypal */ header('Location: '.$config['paypal']['api']['url'].urldecode($paypal->getToken())); } else { /** * error!! */ echo 'ERROR<br /><pre>'.print_r($response,1); } // DoMobileCheckout } else { $response = $paypal->setToken($_REQUEST['token']) ->doMobileCheckoutPayment(); /** * success!! */ if ($paypal->getResponseStatus()) { /** * Returned data * * $response['email'] // buyers email address * $response['payerid'] // unique buyer id * $response['payerstatus'] // status of buyers email * $response['countrycode'] // country code * $response['business'] // buyers business name * $response['phonenum'] // buyers phone number * $response['salutation'] // buyers salutation * $response['firstname'] // buyers first name * $response['middlename'] // buyers middle name * $response['lastname'] // buyers last name * $response['suffix'] // buyers suffix * * $response['custom'] // internaly returned data * $response['invnum'] // returned unique invoice number * $response['transactionid'] // external transaction id * $response['parenttransactionid'] // used for cancels and reversals * $response['receiptid'] // external receipt id * * $response['ordertime'] // current date and time * $response['amt'] // order amount * $response['currencycode'] // currency code * $response['feeamt'] // processing fee deducted * $response['exchangerate'] // exchange rate for currency conversion * * $response['transactiontype'] // send-money * $response['paymentstatus'] // Completed, Pending, or Reversed * $response['reasoncode'] // used for reversals * * $response['name'] // buyers shipping name * $response['shiptostreet'] // buyers shipping address * $response['shiptostreet2'] // buters shipping address 2 * $response['shiptocity'] // buyers shipping city * $response['shiptostate'] // buyers shipping state * $response['shiptocountry'] // buyers shipping country * $response['shiptozip'] // buyers shipping zip * $response['shiptophonenum'] // buyers shipping phone number * $response['addressowner'] // eBay or PayPal * $response['addressstatus'] // None, Confirmed, or Unconfirmed */ } else { /** * error!! */ echo 'ERROR<br /><pre>'.print_r($response,1); } } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.