pilaf / paypal_pdt

A simple class encapsulating Paypal's PDT logic.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Paypal Payment Data Transfer (PDT) class for PHP 5
==================================================

Author: Pedro Fayolle (a.k.a. Pilaf)
Version: 0.1
License: BSD
Date: 2009-08-03

Description
===========

A simple class encapsulating Paypal's PDT logic.

Based on Paypal's DevCentral code example, but made pretty.

Paypal API Documentation:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_html_paymentdatatransfer


Requirements
============

PHP >= 5.1 with sockets support enabled

Basic usage
===========

  $pdt = new PaypalPaymentDataTransfer($_GET['tx'], $auth_token);
  if ($pdt->success) {
    // Output all raw data:
    var_dump($pdt->data);

    // Output just one property:
    echo $pdt->mc_gross;
  }

Options
=======

Pass options as an associative array in the third parameter of the
class constructor.

  - use_sandbox     Use Paypal's sandbox server instead of production
                    Default: false

  - use_ssl         Use HTTPS
                    Default: false

About

A simple class encapsulating Paypal's PDT logic.


Languages

Language:PHP 100.0%