Skip to content
Php library to integrate quickly and easily the service "Paypal Express Checkout" in your website.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
docs
src/Paypal
tests
.gitattributes
.gitignore
.travis.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE
Makefile
README.md
composer.json
phpunit.xml

README.md

Teknoo Software - Paypal Express library

SensioLabsInsight Build Status

This library allows you to integrate quickly and easily the service "Paypal Express Checkout" in your website.

Simple example

//Request generator to communicate with paypal via curl
$requestGenerator = new Teknoo\Curl\RequestGenerator();

//Transport object to communicate with curl
$transport = new Teknoo\Paypal\Express\Transport\Curl93(
    'User Id from Paypal',
    'Password from Paypal',
    'Signature from Paypal',
    'https://api-3t.sandbox.paypal.com/nvp',
    'https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token={token}',
    93,
    'PP-ECWizard',
    60,
    $requestGenerator
);

//Api client
$service = new ExpressCheckout($transport);

$purchase = new class implementing Teknoo\Paypal\Express\Entity\PurchaseInterface {
    // ...
};

//In your html, purchase is an custom object implementing the interface PurchaseInterface
<a href="<?php echo $service->prepareTransaction($purchase); ?>">Process to checkout to paypal</a>
   
//On the result page
$result = $service->getTransactionResult($_GET['token']);
if ($result->isSuccessful()) {
    /* ... */
} else {
   $errors = $result->getErrors();
}

Installation & Requirements

To install this library with composer, run this command :

composer require teknoo/paypal-exprss

This library requires :

* PHP 5.4+
* Teknoo Software Curl Request library

Example

An example of using this library is available in the folder : Demo.

Documentation and how-to

Documentation to explain how this library works and how use it : Behavior.

Credits

Richard Déloge - richarddeloge@gmail.com - Lead developer. Teknoo Software - http://teknoo.software

About Teknoo Software

Teknoo Software is a PHP software editor, founded by Richard Déloge. Teknoo Software's DNA is simple : Provide to our partners and to the community a set of high quality services or software, sharing knowledge and skills.$

License

States is licensed under the MIT and GPL3+ Licenses - see the licenses folder for details

Contribute :)

You are welcome to contribute to this project. Fork it on Github

You can’t perform that action at this time.