GithubHelp home page GithubHelp logo

web5design / paypalnvp-php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neosmart/paypalnvp-php

0.0 1.0 0.0 60 KB

Minimal and lightweight PayPal NVP Library for PHP.

License: MIT License

paypalnvp-php's Introduction

paypalnvp-php is a very light and simple library for the PayPal NVP API.

paypalnvp-php is developed and maintained by Mahmoud Al-Qudsi
<[email protected]> of NeoSmart Technologies <http://neosmart.net/>

paypalnvp-php is a class designed to hide the nuances and communication
with the PayPal backend from developers, without abstracting away the
NVP API. It is meant to be used in tight conjunction with the official
PayPal API reference <http://j.mp/HBkl7K>

Usage:

As mentioned above, the paypalnvp library does not attempt to abstract
the underlying concepts away from the developer. Usage is as easy as
creating an associative array of key => value pairs per the official
PayPal reference, instantiating a new PayPal(user, pass, sig) object
with the NVP credentials, then calling the desired method.

Internally, the paypalnvp library takes care of the authentication,
version, and method NVP key-value pairs. You only need to supply the
method-specific key-value pairs. The library takes care of all
case-sensitivity related issues for the key value, as well as any and
all encoding-related issues for both the key and the value.

For instance, the following is a sample usage of the
GetExpressCheckoutDetails API call:

    $paypal = new PayPal(YOUR_USER, YOUR_PASS, YOUR_SIGNATURE);
    
    $fields = array(
        "Token" => $token
    );
    
    $result = $paypal->GetExpressCheckoutDetails($fields);
    
    $invoice = $result['INVNUM'];
    $email   = $result['EMAIL'];
    $first   = $result['FIRSTNAME'];
    $last    = $result['LASTNAME'];

All the code is contained within PayPal.php and is in the neosmart
namespace.

paypalnvp-php's People

Contributors

cradenbyrg avatar mqudsi avatar

Watchers

 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.