Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mkurc1/payubundle
Symfony PayuBundle
https://github.com/mkurc1/payubundle
Last synced: 8 days ago
JSON representation
Symfony PayuBundle
- Host: GitHub
- URL: https://github.com/mkurc1/payubundle
- Owner: mkurc1
- License: mit
- Created: 2015-09-21T07:08:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-06T08:58:11.000Z (about 9 years ago)
- Last Synced: 2024-04-03T02:21:23.746Z (8 months ago)
- Language: PHP
- Size: 176 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PayUBundle
The bundle integrate [PayU](http://www.payu.pl/) into [Symfony](http://symfony.com/) Framework.
## Configure
Require the bundle with composer:
$ composer require mkurc1/payu-bundle
Enable the bundle in the kernel:
getId();
}
public function getTotalPrice()
{
return 111; // your price
}
/**
* @return int
*/
public function getId()
{
return $this->id;
}
}
Create your PayuOrderRequest class:order;
}
/**
* @param Order $order
*/
public function setOrder($order)
{
$this->order = $order;
}
}
Configure your application:# app/config/config.yml
monolog:
handlers:
payu:
type: stream
path: "%kernel.logs_dir%/payu.log"
channels: [payu]
payu:
class:
request: AppBundle\Entity\PayuOrderRequest # your PayuOrderRequest class
redirect: app_profile_edit # redirect to route after payment
environment: secure
pos_id: 145227
signature_key: 13a980d4f851f3d9a1cfc792fb1f5e50Configure your routing:
# app/config/routing.yml
payu:
resource: "@PayuBundle/Controller/"
type: annotation
Create your Controller:get('payu.client')->createRequest($order);
return $this->redirect($payRequest->getResponse()->redirectUri);
}
}
Update your database schema:$ php app/console doctrine:schema:update --force
You now can use your payment system!
## LicenseThe bundle is released under the [MIT License](LICENSE).