hyva-themes / magento2-react-checkout-paypal-express

Paypal Express Payment method for Hyvä Checkout

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hyvä Themes - React Checkout Paypal Express

Hyvä Themes

hyva-themes/magento2-react-checkout-paypal-express

Paypal Express payment method for Hyvä React Checkout

Prerequisites

  1. React Checkout is installed and setup.
  2. Paypal express is configured in the Magento 2 store backend under Stores > Configuration > Sales > Payment Methods > Paypal Express Checkout.

How to use it with Hyvä React Checkout?

Add below code in your package.json.

File: src/reactapp/package.json

"config": {
    "paymentMethodsRepo": {
      "paypalExpress": "git@github.com:hyva-themes/magento2-react-checkout-paypal-express.git"
    }
},

With this code in package.json and running npm install, then you are all set. This repo will be copied into the Hyvä Checkout and configured correctly.

Finally, we need to build the app again. For this, you need to run npm run build from the root directory of Hyvä Checkout react app (src/reactapp). After this, if you navigate to the checkout page from your site, then you will see the paypal express payment option you have configured in the above step.

Translations

Payment method related translations are available under i18n directory. You need to copy them and include it in the checkout module in order to make them part of the Magento translation process. Along with this, these translations needs to be added via layout xml as well.

File: view/frontend/layout/hyvareactcheckout_reactcheckout_index.xml

<referenceBlock name="checkout.translations">
    <arguments>
        <argument name="checkout_translations" xsi:type="array">
            <item name="hyva_react_checkout_paypal" xsi:type="string">
                <![CDATA[Please agree to the terms and conditions first before placing the order again.,Something went wrong while adding the payment method to the quote.,Please complete all the required data.,Paypal Error]]>
            </item>
        </argument>
    </arguments>
        </referenceBlock>

Documentation

Credits

Special thanks to Webvisum for building the initial release of this Paypal integration for the Hyvä React Checkout!

webvisum GmbH

License

BSD 3-Clause License. Please see License File for more information.

About

Paypal Express Payment method for Hyvä Checkout

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 100.0%