Coder Social home page Coder Social logo

paypal-php-library's Introduction

Angell EYE PayPal PHP Library

This PHP class library for PayPal makes it easy to integrate PayPal APIs, including the Payments Standard Button Manager, Adaptive Accounts, Adaptive Payments, Invoicing, General Merchant APIs, and Permissions.


Server Requirements

  • PHP version 5.3.0 or newer.
  • cURL

Installation

Video Overview

Install via Composer or Manual Download Overview Video

Composer Install

Create a composer.json file with the following section and run composer update.

    "require": {
		"php": ">=5.3.0",
		"ext-curl": "*",
		"angelleye/paypal-php-library": "2.0.*"
	}

Manual Install (without Composer)

  • Download the class library and extract the contents do a directory in your project structure.
  • Upload the files to your web server.

Setup

Open /samples/config/config-sample.php, fill out your details accordingly, and save-as config.php to a location of your choice.

To use the library in your project, include the following into your file(s).

  • /path/to/config.php (It is recommended that you move this to a directory outside your site root on the web server and use an absolute path to include it.)
  • autoload.php

Usage

  • Open the template file that corresponds to the API call you'd like to make.

    • Example: If we want to make a call to the RefundTransaction API we open up /templates/RefundTransaction.php
  • You may leave the file here, or save this file to the location on your web server where you'd like this call to be made.

    • I like to save the files to a separate location and keep the ones included with the library as empty templates.
    • Note that you can also copy/paste the template code into your own file(s).
  • Each template file prepares the PayPal class object for you and includes PHP arrays for every parameter available to that particular API. Simply fill in the array parameters with your own dynamic (or static) data. This data may come from:

    • Session Variables
    • General Variables
    • Database Recordsets
    • Static Values
    • Etc.
  • When you run the file you will get a $PayPalResult array that consists of all the response parameters from PayPal, original request parameters sent to PayPal, and raw request/response info for troubleshooting.

    • You may refer to the PayPal API Reference Guide for details about what response parameters you can expect to get back from any successful API request.
      • Example: When working with RefundTransaction, I can see that PayPal will return a REFUNDTRANSACTIONID, FEEREFUNDAMT, etc. As such, I know that those values will be included in $PayPalResult['REFUNDTRANSACTIONID'] and $PayPalResult['FEEREFUNDAMT'] respectively.
  • If errors occur they will be available in $PayPalResult['ERRORS']

You may refer to this overview video of how to use the library, and there are also samples provided in the /samples directory as well as blank templates ready to use under /templates.

If you need additional help you may place an order for premium support.

Tutorials

Supported APIs

Payments Standard Button Manager

Adaptive Accounts

Adaptive Payments

Button Manager

Invoicing

Merchant

Permissions

PayPal Manager (PayFlow Gateway)

Financing Banners

  • FinancingBannerEnrollment

Deprecated

  • DoMobileCheckoutPayment
  • GetAccessPermissionsDetails
  • GetAuthDetails
  • SetAccessPermissions
  • SetAuthFlowParam
  • SetMobileCheckout
  • UpdateAccessPermissions

Resources

paypal-php-library's People

Contributors

rtconner avatar tyxla avatar

Watchers

James Cloos avatar Radomir Bednar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.