PHP code example of polidog / web-pay-bundle

1. Go to this page and download the library: Download polidog/web-pay-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/ */

    

polidog / web-pay-bundle example snippets


$ vim app/AppKernel.php

...

    public function registerBundles()
    {
        $bundles = [
            // ...
            new Polidog\WebPayBundle\PolidogWebPayBundle(),
        ];
        // ...


    }



class DefaultController extends Controller
{
    /**
     * @Route("/api/test", name="homepage")
     */
    public function indexAction()
    {
        // ...
        $charges = $this->get('polidog_web_pay.web_pay_api')->charge->all(['count' => 1]);
        // ...
    }
}