polidog / payjp-bundle
Installs: 1 036
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- php: ~8.0
- payjp/payjp-php: ^1.2
- symfony/config: ~5.3
- symfony/dependency-injection: ~5.3
- symfony/event-dispatcher: ~5.3
- symfony/http-kernel: ~5.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.2
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-12-07 09:51:59 UTC
README
SymfonyBundle the PAY.JP for PHP.
Requirements
PHP7.1+
Install
composer req polidog/payjp-bundle
Configuration
// AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Polidog\PayjpBundle\PolidogPayjpBundle(),
// ...
);
}
// app/config/polidog_payjp.yaml
polidog_payjp:
public_key: <your public key>
secret_key: <your secret_key>
Using
<?php
namespace App\Command;
use Polidog\PayjpBundle\Payjp;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CustomerShowCommand extends Command
{
/**
* @var Payjp
*/
private $payjp;
public function __construct(Payjp $payjp)
{
$this->payjp = $payjp;
parent::__construct(null);
}
protected function configure()
{
$this->setName('app:customer:retrieve');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$result = $this->payjp->customer->retrieve('cus_141a8ff031230845375b8181293f');
var_dump($result);
}
}