https://github.com/silvercommerce/payments-paypal
Package that adds PayPal payments (via omnipay) along with some customisations
https://github.com/silvercommerce/payments-paypal
Last synced: 5 months ago
JSON representation
Package that adds PayPal payments (via omnipay) along with some customisations
- Host: GitHub
- URL: https://github.com/silvercommerce/payments-paypal
- Owner: silvercommerce
- License: bsd-3-clause
- Created: 2020-10-13T09:56:15.000Z (over 5 years ago)
- Default Branch: 1
- Last Pushed: 2023-08-30T16:39:13.000Z (almost 3 years ago)
- Last Synced: 2025-03-21T11:49:19.696Z (about 1 year ago)
- Language: PHP
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# SilverCommerce Paypal Payments
Package that adds PayPal payments (via omnipay) along with some customisations
Mostly this just installs the required PayPal omnipay package, but it also fixes the redirect issue where PayPal
payments can be identified as "paid" even when they are rejected.
Hopefully this package will also be upgraded at some point to allow adding an "Express Checkout" button to the begining
of the checkout process.
## Installation
Install via composer:
composer require silvercommerce/payments-paypal
## Configuration
Configure how you would any SilverStripe omnipay modules:
_payments.yml_
---
Name: paymentconfig
---
SilverStripe\Omnipay\Model\Payment:
allowed_gateways:
- 'PayPal_Express'
SilverStripe\Omnipay\GatewayInfo:
PayPal_Express:
parameters:
username: 'paypal_api_username'
password: 'paypal_api_password'
signature: 'paypal_api_signiature'
# Config for test environments
---
Except:
environment: 'live'
---
SilverStripe\Omnipay\GatewayInfo:
PayPal_Express:
parameters:
username: 'test_paypal_api_username'
password: 'test_paypal_api_password'
signature: 'test_paypal_api_signiature'
testMode: true
Alternativley, load the PayPal API credentials via environmental variables:
_.env_
PAYPAL_API_USERNAME="test_paypal_api_username"
PAYPAL_API_PASSWORD="test_paypal_api_password"
PAYPAL_API_SIGNATURE="test_paypal_api_signiature"
_payments.yml_
---
Name: paymentconfig
---
SilverStripe\Omnipay\Model\Payment:
allowed_gateways:
- 'PayPal_Express'
SilverStripe\Omnipay\GatewayInfo:
PayPal_Express:
parameters:
username: '`PAYPAL_API_USERNAME`'
password: '`PAYPAL_API_PASSWORD`'
signature: '`PAYPAL_API_SIGNATURE`'