https://github.com/ck-developer/payum-payline
https://github.com/ck-developer/payum-payline
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ck-developer/payum-payline
- Owner: ck-developer
- License: mit
- Created: 2016-06-10T14:54:10.000Z (over 9 years ago)
- Default Branch: develop
- Last Pushed: 2016-06-10T17:44:12.000Z (over 9 years ago)
- Last Synced: 2025-02-28T15:19:15.694Z (12 months ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Skeleton
The Payum extension to rapidly build new extensions.
1. Create new project
```bash
$ composer create-project payum/skeleton
```
2. Replace all occurrences of `payum` with your vendor name. It may be your github name, for now let's say you choose: `acme`.
3. Replace all occurrences of `skeleton` with a payment gateway name. For example Stripe, Paypal etc. For now let's say you choose: `paypal`.
4. Register a gateway factory to the payum's builder and create a gateway:
```php
addGatewayFactory('paypal', function(array $config, GatewayFactoryInterface $coreGatewayFactory) {
return new \Acme\Paypal\PaypalGatewayFactory($config, $coreGatewayFactory);
})
->addGateway('paypal', [
'factory' => 'paypal',
'sandbox' => true,
])
->getPayum()
;
```
5. While using the gateway implement all method where you get `Not implemented` exception:
```php
getGateway('paypal');
$model = new \ArrayObject([
// ...
]);
$paypal->execute(new Capture($model));
```
## Resources
* [Documentation](https://github.com/Payum/Payum/blob/master/src/Payum/Core/Resources/docs/index.md)
* [Questions](http://stackoverflow.com/questions/tagged/payum)
* [Issue Tracker](https://github.com/Payum/Payum/issues)
* [Twitter](https://twitter.com/payumphp)
## License
Skeleton is released under the [MIT License](LICENSE).