This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var card_data = { | |
"type": "visa", | |
"number": "4417119669820331", | |
"expire_month": "11", | |
"expire_year": "2018", | |
"cvv2": "123", | |
"first_name": "Joe", | |
"last_name": "Shopper" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var paypal_sdk = require('paypal-rest-sdk'); | |
var config_options = { | |
'host': 'api.sandbox.paypal.com', | |
'port': '', | |
'client_id': 'EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM', | |
'client_secret': 'EO422dn3gQLgDbuwqTjzrFgFtaRLRR5BdHEESmha49TM' | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class paypal{ | |
private $access_token; | |
private $token_type; | |
/** | |
* Constructor | |
* | |
* Handles oauth 2 bearer token fetch | |
* @link https://developer.paypal.com/webapps/developer/docs/api/#authentication--headers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Process Payment | |
* | |
* Processes a PayPal or credit card payment | |
* @link https://developer.paypal.com/webapps/developer/docs/api/#create-a-payment | |
*/ | |
public function process_payment($request){ | |
$postvals = $request; | |
$uri = URI_SANDBOX . "payments/payment"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define("CLIENT_ID", "YOUR CLIENT ID"); | |
define("CLIENT_SECRET", "YOUR CLIENT SECRET"); | |
define("URI_SANDBOX", "https://api.sandbox.paypal.com/v1/"); | |
define("URI_LIVE", "https://api.paypal.com/v1/"); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class eBayShopping{ | |
//variable instantiation | |
private $uri_shopping = 'http://open.api.ebay.com/shopping'; //Production Shopping API endpoint | |
private $appid = 'YOUR APPLICATION ID'; //Production application ID | |
private $version = '787'; //API version | |
private $format = 'JSON'; //API response format | |
private $siteid = '0'; //Site to search (Currently U.S.) - full site list at http://developer.ebay.com/devzone/shopping/docs/callref/types/SiteCodeType.html | |
private $standard_qstring = ''; //Standard query string parameters to be applied to all requests | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("finding.php"); | |
$ebay = new ebay(); | |
//search by keyword - keywords can be space separated list of searches | |
print_r($ebay->findProduct('findItemsByKeywords', 'Dresses Pants', 2)); | |
//search by category - dresses = 63861, pants = 63863 | |
print_r($ebay->findProduct('findItemsByCategory', '63861', 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Engine = require('ql.io-engine'); | |
var engine = new Engine({ | |
connection: 'close' | |
}); | |
var script = "create table geocoder " + | |
" on select get from 'http://maps.googleapis.com/maps/api/geocode/json?address={address}&sensor=true' " + | |
" resultset 'results.geometry.location'" + | |
"select lat as lattitude, lng as longitude from geocoder where address='Mt. Everest'"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
import types | |
## json.py implements a JSON (http://json.org) reader and writer. | |
## Copyright (C) 2005 Patrick D. Logan | |
## Contact mailto:[email protected] | |
## | |
## This library is free software; you can redistribute it and/or | |
## modify it under the terms of the GNU Lesser General Public | |
## License as published by the Free Software Foundation; either |