2017 © Pedro Peláez
 

symfony-bundle paypalbridgebundle

Symfony2 Bundle creates a bridge for the PayPal REST SDK

image

kmj/paypalbridgebundle

Symfony2 Bundle creates a bridge for the PayPal REST SDK

  • Wednesday, October 8, 2014
  • by demoboy
  • Repository
  • 6 Watchers
  • 7 Stars
  • 37,374 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 2 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

KMJPayPalBridgeBundle

Welcome to the KMJPayPalBridgeBundle. The goal of this bundle is to provide an easy way to integrate the Paypal SDK into a Symfony project., (*1)

1) Installation

KMJPayPalBridgeBundle can conveniently be installed via Composer. Just add the following to your composer.json file:, (*2)

// composer.json
{
    // ...
    require: {
        // ..
        "paypal/rest-api-sdk-php": "dev-master",
        "kmj/paypalbridgebundle": "dev-master"

    }
}

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:, (*3)

    php composer.phar update

Now, Composer will automatically download all required files, and install them for you. All that is left to do is to update your AppKernel.php file, and register the new bundle:, (*4)

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new KMJ\PayPalBridgeBundle\KMJPayPalBridgeBundle(),
    // ...
);

2) Usage

The KMJPayPalBridgeBundle is called as a standard service., (*5)

$this->get('paypal')

This returns a service that sets the paypal SDK with the proper ini settings. The service also contains a valid PayPal\Rest\ApiContext object that can be passed to other PayPal objects. This bundle also automatically swtiches the bundle based on the environment. The production environment is the only environment that gets the production endpoint for PayPal, (*6)

3) Configuration

kmj_pay_pal_bridge:
    environment: sandbox/production                      //The environment to make the calls to
    sandbox:
        clientId:                                           //Client Id provided from developer.paypal.com
        secret:                                             //Client Secret provided from developer.paypal.com
    production:
        clientId:                                           //Client Id provided from developer.paypal.com
        secret:                                             //Client Secret provided from developer.paypal.com
    logs:
        enabled: true                                   //Should logs be used
        filename: %kernel.root_dir%/logs/paypal.log     //the location for the log file
        level: fine                                     //level of log reporting
    http:
        timeout: 30                                     //The http timeout before an error is generated
        retry: true                                     //Should the request be tried again if timeout is reached

The Versions

08/10 2014

dev-master

9999999-dev http://github.com/Demoboy/PayPalBridgeBundle

Symfony2 Bundle creates a bridge for the PayPal REST SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kaelin Jacobson

paypal kmj

12/03 2013

dev-develop

dev-develop http://github.com/Demoboy/PayPalBridgeBundle

Symfony2 Bundle creates a bridge for the PayPal REST SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kaelin Jacobson

paypal kmj