PHP Classes

File: markaspaid.example.php

Recommend this page to a friend!
  Classes of Mubashir Ali   Paypal Invoice API   markaspaid.example.php   Download  
File: markaspaid.example.php
Role: Example script
Content type: text/plain
Description: It is an example that shows how to perform Mark Invoice as Paid operation
Class: Paypal Invoice API
Create and manage invoices Paypal Invoicing API
Author: By
Last change:
Date: 13 years ago
Size: 1,097 bytes
 

Contents

Class file image Download
<?php
   
/**
     * @author Mubashir Ali (Lahore, Pakistan)
     * saad_ali6@yahoo.com
     * @category Paypal Invoice API
     * @@abstract This class performs the PAYPAL INVOICE API's operations
     * @since 03-01-2012
     * @version 1.1
     * @todo Basic functionalities are performed - workflow of pending tasks still left
     * There is sample Array data is also entered to view the demo
     */

   
$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"); //pass 'live' for actual paypal account

   
$aryData['response_invoice_id'] = "xxxx-xxxx-xxxx-xxxx";
   
$aryData['payment_date'] = date("Y-m-d");
   
$aryData['payment_note'] = "Notes";
   
$aryData['payment'] = "Payment";
   
$aryData['method'] = "PayPal";

   
$res = $objInv->doMarkAsPaid($aryData);

    echo
"<pre>";
   
print_r($res);
    echo
"</pre>";
?>