PHPackages                             open-dxp/payment-provider-paypal-smart-payment-button-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. open-dxp/payment-provider-paypal-smart-payment-button-bundle

ActiveOpendxp-bundle[Payment Processing](/categories/payments)

open-dxp/payment-provider-paypal-smart-payment-button-bundle
============================================================

OpenDXP Payment Provider - Paypal Smart Payment Button

v1.0.0(3mo ago)00GPL-3.0+PHPCI passing

Since Feb 4Pushed 3mo agoCompare

[ Source](https://github.com/open-dxp/payment-provider-paypal-smart-payment-button-bundle)[ Packagist](https://packagist.org/packages/open-dxp/payment-provider-paypal-smart-payment-button-bundle)[ RSS](/packages/open-dxp-payment-provider-paypal-smart-payment-button-bundle/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

OpenDXP E-Commerce Framework Payment Provider - PayPal Smart Payment Buttons
============================================================================

[](#opendxp-e-commerce-framework-payment-provider---paypal-smart-payment-buttons)

---

Disclaimer
----------

[](#disclaimer)

> OpenDXP is a community-driven fork based on the Pimcore® Community Edition (GPLv3).
> OpenDXP is independent and maintained by its community and contributors. It is not affiliated with, endorsed by, or sponsored by Pimcore GmbH.
> Original credits: [Pimcore GmbH](https://www.pimcore.com)

**OpenDXP E-Commerce Framework Payment Provider - PayPal Smart Payment Buttons is based on the Pimcore® Community Edition and remains licensed under GPLv3.**

---

Installation
------------

[](#installation)

Install latest version with Composer:

```
composer require open-dxp/payment-provider-paypal-smart-payment-button-bundle
```

Enable bundle via console:

```
php bin/console opendxp:bundle:enable OpenDxpPaymentProviderPayPalSmartPaymentButtonBundle
php bin/console opendxp:bundle:install OpenDxpPaymentProviderPayPalSmartPaymentButtonBundle
```

For configuration details see further below. For additional information of PayPal API credentials see [API Docs](https://developer.paypal.com/docs/api/overview/)

Configuration
-------------

[](#configuration)

The Payment Manager is responsible for implementation of different Payment Provider to integrate them into the framework.

For more information about Payment Manager, see [Payment Manager Docs](https://github.com/open-dxp/opendxp/blob/1.x/doc/Development_Documentation/10_E-Commerce_Framework/13_Checkout_Manager/07_Integrating_Payment.md).

Configure payment provider in the `opendxp_ecommerce_config.payment_manager` config section:

```
opendxp_ecommerce_framework:
    payment_manager:
        payment_manager_id: OpenDxp\Bundle\EcommerceFrameworkBundle\PaymentManager\PaymentManager

        providers:
            paypal:
                provider_id: OpenDxp\Bundle\EcommerceFrameworkBundle\PaymentManager\Payment\PayPalSmartPaymentButton
                profile: sandbox
                profiles:
                    sandbox:
                        client_id:
                        client_secret:

                        # defines, if payment caputure should take place automatic or manual, default is automatic
                        capture_strategy: automatic

                        # defines mode of PayPal API, default value is sandbox
                        mode: sandbox

                        # defines PayPal application context for shipping, default value is NO_SHIPPING
                        # see https://developer.paypal.com/docs/api/orders/v2/#definition-application_context
                        shipping_preference: NO_SHIPPING

                        # defines PayPal application context for user action, default value is PAY_NOW
                        # see https://developer.paypal.com/docs/api/orders/v2/#definition-application_context
                        user_action: PAY_NOW

                    live:
                        client_id:
                        client_secret:
                        mode: live
```

Implementation
--------------

[](#implementation)

Integrate the PayPal payment button to your view template

Integrate PayPal payment button and overwrite a few methods like in the sample. At least `createOrder` and `onApprove` need to be overwritten.

```
