planetpay/planet-sylius-payment-plugin

PlanetPay payment plugin for Sylius.

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:sylius-plugin

pkg:composer/planetpay/planet-sylius-payment-plugin


README

Planet Pay logo

Installation

  1. Install the plugin ()
     composer require planetpay/planet-sylius-payment-plugin
    
  2. Enable this plugin :

     <?php
        
     # config/bundles.php
        
     return [
         // ...
         PlanetPay\SyliusPaymentPlugin\PlanetPaySyliusPaymentPlugin::class => ['all' => true],
         // ...
     ];
    
  3. Import packages configuration

     # config/packages/planetpay_sylius.yaml
    
     imports:
     - { resource: "@PlanetPaySyliusPaymentPlugin/config/config.yaml" }
    
  4. Import routes configuration

     # config/routes/sylius_planetpay.yaml
    
    sylius_planetpay:
        resource: "@PlanetPaySyliusPaymentPlugin/config/routes.yaml"
    
  5. Doctrine schema update
    php bin/console doctrine:migrations:diff
    php bin/console doctrine:migrations:migrate
    
  6. Copy assets
    php vendor/planetpay/planet-sylius-payment-plugin/etc/build/copy_assets.php
    
  7. Clear cache
    php bin/console cache:clear
    

Configuration

  • Go to the admin area.
  • Log in.
  • Click on the left menu item "CONFIGURATION > Payment methods".
  • Create a new payment method type "Planet Pay":
  • The next chapter will explain how to fill the payment method creation form.

Payment Method configuration

A form will be displayed, fill-in the required fields :

1. The "code" field (ex: "planet_pay").

💡 The code field defines the gateway name and is required for the plugin to function correctly. Each payment method must use one of the following codes exactly as listed below to ensure proper webhook handling and payment processing:

CodeMethod
planet_payAll payments
planet_pay_apayApple Pay
planet_pay_blikBlik
planet_pay_cardPayment Card
planet_pay_gpayGoogle Pay
planet_pay_pblTransfer Online

2. Choose which channels this payment method will be affected to.

3. The gateway configuration:

Fill in the following mandatory fields in the gateway configuration form:

  • MID your PlanetPay account MID
  • Secret the secret API key
  • Order description visible to the customer
  • Webhook key used to sign notifications

4. Give to this payment method a display name (and optional a description) for each language you need.

Finally, click on the "Create" button to save your new payment method.

API keys

Get your mid and your secret on your Planet Pay dashboard :

https://planetpay.pl/

Configuration address URL

TypeURL
Notification URL/planetpay/payments/notification
Return URL/planetpay/payments/successpage

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

License

Please see the License File for more information about licensing.