polidog / web-pay-bundle
0.0.2
2016-09-15 15:12 UTC
Requires
- php: >= 5.4.0
- symfony/config: ~3.0|~2.3
- symfony/dependency-injection: ~3.0|~2.3
- symfony/event-dispatcher: ~3.0|~2.3
- symfony/framework-bundle: ~3.0|~2.3
- symfony/http-kernel: ~3.0|~2.3
- webpay/webpay: ~2.2
Requires (Dev)
- phpunit/phpunit: ^5.4
This package is auto-updated.
Last update: 2024-12-21 21:08:39 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