Created
February 18, 2015 19:49
-
-
Save henzard/a71e7166d7a0d2541be8 to your computer and use it in GitHub Desktop.
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
require 'lib/XeroOAuth.php'; | |
define ( 'BASE_PATH', dirname(__FILE__) ); | |
define ( "XRO_APP_TYPE", "Private" ); | |
define ( "OAUTH_CALLBACK", "oob" ); | |
$useragent = "XeroOAuth-PHP Private App Test"; | |
$signatures = array ( | |
'consumer_key' => '1JEYWPUR43TZRLNDVQRAA1OPRD5DET', | |
'shared_secret' => 'IWYELLDUQLWMXU7AO7GUZFOMITXNB4', | |
// API versions | |
'core_version' => '2.0', | |
'payroll_version' => '1.0', | |
'file_version' => '1.0' | |
); | |
if (XRO_APP_TYPE == "Private" || XRO_APP_TYPE == "Partner") { | |
$signatures ['rsa_private_key'] = BASE_PATH . '/certs/privatekey.pem'; | |
$signatures ['rsa_public_key'] = BASE_PATH . '/certs/publickey.cer'; | |
} | |
//First Action Create Xero | |
$XeroOAuth = new XeroOAuth ( array_merge ( array ( | |
'application_type' => XRO_APP_TYPE, | |
'oauth_callback' => OAUTH_CALLBACK, | |
'user_agent' => $useragent | |
), $signatures ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment