-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from angelleye/PPL-170
Ppl 170
- Loading branch information
Showing
8 changed files
with
2,589 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
use angelleye\PayPal\rest\invoice\InvoiceAPIv2; | ||
|
||
// Include required library files. | ||
require_once('../../../autoload.php'); | ||
require_once('../../../includes/config.php'); | ||
|
||
$configArray = array( | ||
'Sandbox' => $sandbox, | ||
'ClientID' => $rest_client_id, | ||
'ClientSecret' => $rest_client_secret, | ||
'LogResults' => $log_results, | ||
'LogPath' => $log_path, | ||
'LogLevel' => $log_level | ||
); | ||
$PayPal = new InvoiceAPIv2($configArray); | ||
|
||
$cancelNotification = array( | ||
'subject' => 'Past due', // Subject of the notification. | ||
'note' => 'Canceling invoice', // Note to the payer. | ||
'send_to_invoicer' => true, // Indicates whether to send a copy of the notification to the merchant. | ||
'send_to_recipient' => true, // Indicates whether to send a copy of the notification to the payer. | ||
'additional_recipients' => array(), // Applicable for invoices created with Cc emails. If this field is not in the body, all the cc email addresses added as part of the invoice shall be notified else this field can be used to limit the list of email addresses. Note: additional email addresses are not supported. | ||
); | ||
|
||
$InvoiceID = 'INV2-YZZF-D7VN-P2YM-9ZH2'; // Required. Specify the ID of the invoice to cancel. | ||
|
||
$returnArray = $PayPal->CancelInvoice($cancelNotification,$InvoiceID); | ||
echo "<pre>"; | ||
print_r($returnArray); |
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,23 @@ | ||
<?php | ||
|
||
use angelleye\PayPal\rest\invoice\InvoiceAPIv2; | ||
|
||
// Include required library files. | ||
require_once('../../../autoload.php'); | ||
require_once('../../../includes/config.php'); | ||
|
||
$configArray = array( | ||
'Sandbox' => $sandbox, | ||
'ClientID' => $rest_client_id, | ||
'ClientSecret' => $rest_client_secret, | ||
'LogResults' => $log_results, | ||
'LogPath' => $log_path, | ||
'LogLevel' => $log_level | ||
); | ||
$PayPal = new InvoiceAPIv2($configArray); | ||
|
||
$InvoiceID = 'INV2-YZZF-D7VN-P2YM-9ZH2'; // Required. The ID of the invoice for which to show details. | ||
|
||
$returnArray = $PayPal->DeleteInvoice($InvoiceID); | ||
echo "<pre>"; | ||
print_r($returnArray); |
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,23 @@ | ||
<?php | ||
use angelleye\PayPal\rest\invoice\InvoiceAPIv2; | ||
|
||
// Include required library files. | ||
require_once('../../../autoload.php'); | ||
require_once('../../../includes/config.php'); | ||
|
||
$configArray = array( | ||
'Sandbox' => $sandbox, | ||
'ClientID' => $rest_client_id, | ||
'ClientSecret' => $rest_client_secret, | ||
'LogResults' => $log_results, | ||
'LogPath' => $log_path, | ||
'LogLevel' => $log_level | ||
); | ||
|
||
$PayPal = new InvoiceAPIv2($configArray);; | ||
$InvoiceID = 'INV2-9LG8-P8ZN-4MPN-F5PA'; //Required. The ID of the invoice for which to show details. | ||
|
||
$returnArray = $PayPal->GetInvoice($InvoiceID); | ||
echo "<pre>"; | ||
print_r($returnArray); | ||
|
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,21 @@ | ||
<?php | ||
|
||
use angelleye\PayPal\rest\invoice\InvoiceAPIv2; | ||
|
||
// Include required library files. | ||
require_once('../../../autoload.php'); | ||
require_once('../../../includes/config.php'); | ||
|
||
$configArray = array( | ||
'Sandbox' => $sandbox, | ||
'ClientID' => $rest_client_id, | ||
'ClientSecret' => $rest_client_secret, | ||
'LogResults' => $log_results, | ||
'LogPath' => $log_path, | ||
'LogLevel' => $log_level | ||
); | ||
$PayPal = new InvoiceAPIv2($configArray); | ||
|
||
$returnArray = $PayPal->GetNextInvoiceNumber(); | ||
echo "<pre>"; | ||
print_r($returnArray); |
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,27 @@ | ||
<?php | ||
|
||
use angelleye\PayPal\rest\invoice\InvoiceAPIv2; | ||
|
||
// Include required library files. | ||
require_once('../../../autoload.php'); | ||
require_once('../../../includes/config.php'); | ||
|
||
$configArray = array( | ||
'Sandbox' => $sandbox, | ||
'ClientID' => $rest_client_id, | ||
'ClientSecret' => $rest_client_secret, | ||
'LogResults' => $log_results, | ||
'LogPath' => $log_path, | ||
'LogLevel' => $log_level | ||
); | ||
$PayPal = new InvoiceAPIv2($configArray); | ||
|
||
$parameters = array( | ||
'page' => '0', // A zero-relative index of the list of merchant invoices. | ||
'page_size' => '4', // The number of invoices to list beginning with the specified page. | ||
'total_count_required ' => 'true', // Indicates whether the total count appears in the response. Default is false. | ||
); | ||
|
||
$returnArray = $PayPal->ListInvoice($parameters); | ||
echo "<pre>"; | ||
print_r($returnArray); |
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,23 @@ | ||
<?php | ||
|
||
use angelleye\PayPal\rest\invoice\InvoiceAPIv2; | ||
|
||
// Include required library files. | ||
require_once('../../../autoload.php'); | ||
require_once('../../../includes/config.php'); | ||
|
||
$configArray = array( | ||
'Sandbox' => $sandbox, | ||
'ClientID' => $rest_client_id, | ||
'ClientSecret' => $rest_client_secret, | ||
'LogResults' => $log_results, | ||
'LogPath' => $log_path, | ||
'LogLevel' => $log_level | ||
); | ||
$PayPal = new InvoiceAPIv2($configArray); | ||
|
||
$InvoiceID = 'INV2-YZZF-D7VN-P2YM-9ZH2'; // Required. The ID of the invoice to send. | ||
|
||
$returnArray = $PayPal->SendInvoice($InvoiceID); | ||
echo "<pre>"; | ||
print_r($returnArray); |
Oops, something went wrong.