PHP code example of webgriffe / sylius-pausepay-plugin

1. Go to this page and download the library: Download webgriffe/sylius-pausepay-plugin 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/ */

    

webgriffe / sylius-pausepay-plugin example snippets


    

    declare(strict_types=1);

    namespace App\Entity\Payment;

    use Doctrine\ORM\Mapping as ORM;
    use Webgriffe\SyliusPausePayPlugin\Entity\PaymentOrder as BasePaymentOrder;
    
    /**
     * @ORM\Entity
     * @ORM\Table(name="webgriffe_sylius_pausepay_payment_order")
     */
    class PaymentOrder extends BasePaymentOrder
    {
    }

    

    
    
    declare(strict_types=1);
    
    namespace App\Resolver\PausePay;
    
    use Sylius\Component\Core\Model\OrderInterface;
    use Webgriffe\SyliusPausePayPlugin\Resolver\CompanyInfoResolverInterface;
    use Webgriffe\SyliusPausePayPlugin\ValueObject\CompanyInfo;
    
    final class CompanyInfoResolver implements CompanyInfoResolverInterface
    {
        public function resolveFromOrder(OrderInterface $order): CompanyInfo
        {
            // TODO: your logic here
        }
    }
    
yaml
    imports:
      - { resource: "@WebgriffeSyliusPausePayPlugin/config/config.php" }
    
yaml
    webgriffe_sylius_pausepay_plugin_shop:
        resource: "@WebgriffeSyliusPausePayPlugin/config/routes/shop.php"
        prefix: /{_locale}
         "@WebgriffeSyliusPausePayPlugin/config/routes/index.php"
    
    webgriffe_sylius_pausepay_plugin_payum:
        resource: "@WebgriffeSyliusPausePayPlugin/config/routes/payum.php"
    
    sylius_shop_payum_cancel:
        resource: "@PayumBundle/Resources/config/routing/cancel.xml"
    
bash
    php bin/console doctrine:migrations:migrate
    
bash
    php bin/console sylius:install:assets
   
javascript
    .addEntry(
        'webgriffe-sylius-pausepay-entry',
        './vendor/webgriffe/sylius-pausepay-plugin/public/poll_payment.js'
    )