Code Monkey home page Code Monkey logo

paypalbridgebundle's Introduction

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. Installation

KMJPayPalBridgeBundle can conveniently be installed via Composer. Just add the following to your composer.json file:

// composer.json
{
    // ...
    require: {
        // ..
        "paypal/rest-api-sdk-php": "dev-master",
        "kmj/paypalbridgemaster": "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:

    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:

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

The KMJPayPalBridgeBundle is called as a standard service.

$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

  1. Configuration

kmj_pay_pal_bridge: 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

paypalbridgebundle's People

Contributors

justinpfister avatar demoboy avatar

Watchers

 avatar James Cloos 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.