PHP code example of axelvnk / sylius-mollie-payum-bundle

1. Go to this page and download the library: Download axelvnk/sylius-mollie-payum-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

axelvnk / sylius-mollie-payum-bundle example snippets

 bash
$ php composer.phar update axelvnk/sylius-mollie-payum-bundle
 php
// app/AppKernel.php



public function registerBundles()
{
    $bundles = array(
        ...
        new Axelvnk\SyliusMolliePayumBundle\SyliusMolliePayumBundle(),
    );
}
 php


$order->setCheckoutState(OrderCheckoutStates::STATE_PAYMENT_SELECTED);
 php


/** @var Payment $payment */
$payment = $request->getModel();

/** @var Order $order */
$order = $payment->getOrder();

if ($payment->getState() === Payment::STATE_COMPLETED) {
    $order->setCheckoutState(OrderCheckoutStates::STATE_COMPLETED);
    $this->orderEmailManager->sendConfirmationEmail($order);
    $request->setRouteName('sylius_shop_order_thank_you');

    return;
}
$order->setState(OrderInterface::STATE_CART);
$order->setCheckoutState(OrderCheckoutStates::STATE_PAYMENT_SELECTED);
$order->setShippingState(OrderShippingStates::STATE_READY);
$order->setPaymentState(OrderPaymentStates::STATE_AWAITING_PAYMENT);

$request->setRouteName('sylius_shop_checkout_complete');