-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example of getting a charge with Payments API.
- Loading branch information
1 parent
bbf63aa
commit de4724a
Showing
4 changed files
with
97 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
require_once dirname(__FILE__) . '/config.php'; | ||
|
||
require_once dirname(__FILE__) . '/views/header.tpl.php'; | ||
|
||
?> | ||
|
||
<pre> | ||
|
||
<?php | ||
|
||
$id = 'EY32QCYC6RTX'; | ||
|
||
$Payments = new QuickBooks_Payments($oauth_consumer_key, $oauth_consumer_secret, $sandbox); | ||
|
||
if ($Transaction = $Payments->getCharge($Context, $id)) | ||
{ | ||
print('Id: ' . $Transaction->getId() . '<br>'); | ||
print('Auth Code: ' . $Transaction->getAuthCode() . '<br>'); | ||
print('Status: ' . $Transaction->getStatus() . '<br>'); | ||
} | ||
else | ||
{ | ||
print('Error while getting charge: ' . $Payments->lastResponse()); | ||
} | ||
|
||
print('<br><br><br><br>'); | ||
print("\n\n\n\n\n\n\n\n"); | ||
print('Request [' . $Payments->lastRequest() . ']'); | ||
print("\n\n\n\n"); | ||
print('Response [' . $Payments->lastResponse() . ']'); | ||
print("\n\n\n\n\n\n\n\n\n"); | ||
|
||
?> | ||
|
||
</pre> | ||
|
||
<?php | ||
|
||
require_once dirname(__FILE__) . '/views/footer.tpl.php'; |
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
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