PHP Classes

File: searchinvoice.example.php

Recommend this page to a friend!
  Classes of Mubashir Ali   Paypal Invoice API   searchinvoice.example.php   Download  
File: searchinvoice.example.php
Role: Example script
Content type: text/plain
Description: It is an example that shows how to search Invoice(s) by pasing search parameters
Class: Paypal Invoice API
Create and manage invoices Paypal Invoicing API
Author: By
Last change:
Date: 13 years ago
Size: 1,817 bytes
 

Contents

Class file image Download
<?php
   
/**
     * @author Mubashir Ali (Lahore, Pakistan)
     * saad_ali6@yahoo.com
     * @category Paypal Invoice API
     * @@abstract This performs the SeachInvoice API Operation
     * @since 03-01-2011
     * @version 2.0
     */

   
$API_Username = "xxxxxxxxxxxxxxxxx.xxx.xxx";
   
$API_Password = "xxxxxxxxxx";
   
$Signature = "xxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx-xxxxxxxxxxxxx-xxxxxxxxxx";
   
$business = "xxxxxxxx@xxxxxx.xxx";

    require_once(
'class.invoice.php');

   
$ppInv = new PaypalInvoiceAPI("sandbox");

   
/**
     * Populate Data
     */
   
$aryData['language'] = "en_US";
   
$aryData['merchantEmail'] = $business;

   
$aryData['search_origin'] = "USD";
   
$aryData['search_email'] = "USD";
   
$aryData['pane_no'] = 1;
   
$aryData['page_records'] = "20"; //20 records of first page

    /**
     * Now the Search Parameters
     */
   
$aryData['email'] = "xxx.xxxxx@xxxx.xxx";
   
$aryData['recipient_name'] = "";
   
$aryData['business_name'] = "";
   
$aryData['invoice_number'] = "";
   
$aryData['lower_amount'] = "";
   
$aryData['upper_amount'] = "";
   
$aryData['currency_code'] = "";
   
$aryData['memo'] = "";
   
$aryData['origin'] = "";
   
$aryData['invoice_start_date'] = "";
   
$aryData['invoice_end_date'] = "";
   
$aryData['due_start_date'] = "";
   
$aryData['due_end_date'] = "";
   
$aryData['payment_start_date'] = "";
   
$aryData['payment_end_date'] = "";
   
$aryData['creation_start_date'] = "";
   
$aryData['creation_end_date'] = "";

   
$res = $ppInv->doSearchInvoice($aryData);
    if(
$res['responseEnvelope.ack']== "Success")
    {
        echo
"<pre>";
       
print_r($res);
        echo
"</pre>";
    }
    else
    {
        echo
$ppInv->formatErrorMessages($res);
    }

?>