Download the PHP package akawaka/sylius-soge-commerce-plugin without Composer

On this page you can find all versions of the php package akawaka/sylius-soge-commerce-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sylius-soge-commerce-plugin

AkawakaSyliusSogeCommercePlugin

Soge commerce payment method plugin.

Documentation

Features

This plugin integrates the SogeCommerce payment method using "Smart Forms".

Unlike traditional payment gateways, the payment form is embedded directly on the payment selection page. This introduces unique challenges, which are detailed in the next section.

How It Works

Since the payment form is available on the payment selection page, the user is paying for a cart, not an order. This differs from the standard Sylius flow, where payment typically occurs after the cart has been converted into an order.

Payment Flow

When a payment is made, SogeCommerce Smart Forms allows defining a return URL. The controller handling this URL performs the following actions:

  1. Verify the authenticity of the request to prevent fraud.
  2. Retrieve the cart and ensure the correct payment method is assigned.
  3. Check if the payment was successful:
    • If the payment fails, the user is redirected back to the payment selection page with a flash message.
    • If the payment succeeds, the cart is converted into an order, and the user is redirected to the next checkout step.

Differences from a Traditional Sylius Payment Gateway

In a standard Sylius payment gateway, the process relies on StatusAction and CaptureAction. These actions are present in this plugin as well but behave differently due to the fact that payment is processed on the payment selection page rather than after checkout.

CaptureAction

StatusAction

Preventing Cart Modifications After Payment

The Problem:

Since payment happens before the cart becomes an order, the user can modify the cart in another browser tab after making a payment. This could lead to a mismatch between the paid amount and the actual cart total.

The Solution:

Handling Failed Payment Cancellations

If the cancellation request to SogeCommerce's API fails (e.g., the API is disabled), the plugin dispatches a PaymentCancelationFailedEvent.

Important: The plugin does not listen for this event by default.

To handle this scenario, you should:

Summary

Install guide

1. Run composer require akawaka/sylius-soge-commerce-plugin
2. Change your config/bundles.php file to add the line for the plugin :
3. Import routing in your config/routes.yaml file:
4. Update sylius templates:

cp -R vendor/akawaka/sylius-soge-commerce-plugin/tests/Application/templates/* templates/

You might want to override this plugin templates:

cp -R vendor/akawaka/sylius-soge-commerce-plugin/templates/* templates/bundles/AkawakaSyliusSogeCommercePlugin/

NOTE: The content in tests/Application/templates/bundles/SyliusShopBundle/_scripts.html.twig should be adapted to your theme and moved to an asset file.

5. That's it !

Quickstart Installation

Please refer to https://github.com/Sylius/PluginSkeleton/tree/1.14.


All versions of sylius-soge-commerce-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
sylius/sylius Version ^1.12
symfony/webpack-encore-bundle Version ^1.15
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package akawaka/sylius-soge-commerce-plugin contains the following files

Loading the files please wait ....