polidog/web-pay-bundle

0.0.2 2016-09-15 15:12 UTC

This package is auto-updated.

Last update: 2024-10-21 20:51:49 UTC


README

A Symfony Bundle for including webpay-php

Requirements

PHP 5.4+

Installation

$ composer require polidog/web-pay-bundl

and adding an instance of Polidog\WepPayBundle\PolidogWebPayBundle to your application's kernel.

$ vim app/AppKernel.php

...

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


    }

and parameter settings.

polidog_web_pay:
    public_api_key: "your pubic api key"
    secret_api_key: "your secret api key"

Usage

basic api call for controller.

<?php

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]);
        // ...
    }
}

api document WebPay docuemnt

License

MIT