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 | |
| require 'ConfigFactory.php'; | |
| require 'OAuthRequest.php'; | |
| $c = new Creds(); | |
| $creds = $c->creds(); | |
| $links = $c->links(); | |
| $accessTokenData = getAccessToken($links, $creds); | |
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
| function OAuthObject(linkObject, tokenObject, idObject, queryParameters){ | |
| this.linkObject = linkObject; | |
| this.credentialObject = getCredentials(); | |
| this.tokenObject = tokenObject; | |
| this.idObject = idObject; | |
| this.queryParameters = queryParameters; | |
| this.parameterAggregate = []; | |
| this.authorization_Headers = ''; |
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
| function API_Demo(){ | |
| this.tokenObject={}; | |
| this.idObject={}; | |
| this.endPoints = getEndpoints(); | |
| this.setIdObject = function(id){ | |
| this.idObject = { |
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
| function API_Demo(){ | |
| this.tokenObject={}; | |
| this.endPoints = getEndpoints(); | |
| this.captureResourceId = function (location){ | |
| return location.substr(location.lastIndexOf('/') + 1, location.length); | |
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
| var Config = { | |
| credentials: { | |
| "consumerKey" : "", | |
| "consumerSecret" : "" | |
| }, | |
| Endpoints: { | |
| request: { | |
| url: 'https://sandbox.api.prioritypaymentsystems.com/checkout/v1.1/' + 'oauth/1a/requesttoken' | |
| ,method: "POST" |
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
| function Payment(){ | |
| var setTokenData = function(response){ | |
| Config.tokens.oauth_token = response.oauth_token; | |
| Config.tokens.oauth_token_secret = response.oauth_token_secret; | |
| } | |
| var Tokens = { |
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
| function demoAPI(){ | |
| var DA = new API_Demo(); | |
| DA.setTokens(); | |
| DA.postPayment(); | |
| DA.getPaymentById(); | |
| } | |
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
| function oauth(method, url,token,tokenSecret){ | |
| var consumerKey = ""; | |
| var consumerSecret = ""; | |
| var params = { | |
| "oauth_consumer_key": consumerKey, | |
| "oauth_nonce": generateNonce(), | |
| "oauth_signature_method": "HMAC-SHA1" | |
| } |
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
| namespace Card_Account_Transactions | |
| { | |
| public class ConfigFactory | |
| { | |
| public string consumerKey; | |
| public string consumerSecret; | |
| public string merchantId; | |
| public string baseURL; |
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 | |
| require 'ConfigFactory.php'; | |
| require 'OAuthRequest.php'; | |
| $c = new Creds(); | |
| $creds = $c->creds(); | |
| $links = $c->links(); | |
| $accessTokenData = getAccessToken($links, $creds); | |
NewerOlder