This file contains hidden or 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 | |
// WePay PHP SDK - http://git.io/mY7iQQ | |
require 'wepay.php'; | |
// application settings | |
<span class="variable">$client_id</span> = 123456789; | |
<span class="variable">$client_secret</span> = "1a3b5c7d9"; | |
<span class="variable">$access_token</span> = "1a3b5c7d9"; | |
// change to useProduction for live environments |
This file contains hidden or 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
# WePay Ruby SDK - http://git.io/a_c2uQ | |
require 'wepay' | |
# application settings | |
<span class="variable">client_id</span> = 123456789 | |
<span class="variable">client_secret</span> = '1a3b5c7d9' | |
<span class="variable">access_token</span> = '1a3b5c7d9' | |
# set _use_stage to false for live environments | |
wepay = WePay::Client.new(client_id, client_secret, _use_stage = true) |
This file contains hidden or 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
{ | |
"user_id":123456, | |
"access_token":"1a2b3c4d5e6f", | |
"token_type":"BEARER" | |
} |
This file contains hidden or 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
https://stage.wepayapi.com/v2/oauth2/token? | |
client_id=[your client id] | |
&<strong>redirect_uri=[your redirect uri] | |
&client_secret=[your client secret] | |
&code=[code you got in the previous step] |
This file contains hidden or 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
http://example.com/setup?<strong>code</strong>=1a2b3c4d5e6f |
This file contains hidden or 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
{ | |
"first_name":"Bob", | |
"last_name": "Smith", | |
"email":"bob@smith.com", | |
"state":"registered" | |
} |
This file contains hidden or 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 | |
$access_token = 'token'; // access_token received from /oauth2/token call | |
$ch = curl_init('https://stage.wepayapi.com/v2/user'); // URL of the call | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, | |
array("Authorization: Bearer $access_token")); | |
// execute the api call | |
$result = curl_exec($ch); | |
// display the json response |
This file contains hidden or 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
# WePay Python SDK - http://git.io/v7Y1jA | |
from wepay import WePay | |
# set production to True for live environments | |
PRODUCTION = False | |
# set API Version. Change this to the API Version you want to use. | |
API_VERSION = "2016-08-10" | |
wepay = WePay(PRODUCTION, ACCESS_TOKEN, API_VERSION) |
This file contains hidden or 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
# WePay Ruby SDK - http://git.io/a_c2uQ | |
require 'wepay' | |
# set API Version. Change this to the API Version you want to use. | |
API_VERSION = "2016-08-10" | |
wepay = WePay.new(<YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, API_VERSION) | |
# create the checkout | |
response = wepay.call('/account', ACCESS_TOKEN, { |
NewerOlder