ksolutionspro / payum-paynow
Payum support for paynow.pl payment gateway
Installs: 109
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.1
- pay-now/paynow-php-sdk: ^2.4
- payum/core: ^1.7.5
Requires (Dev)
- symfony/http-client: ^6.4
This package is auto-updated.
Last update: 2025-02-13 17:05:48 UTC
README
This is a basic Paynow.pl payment gateway for Payum.
Installation
To install this package, you can use composer:
composer require payum/paynow ksolutionspro/payum-paynow
Usage
Simply register the gateway factory and you're good to go.
Symfony integration
If you are planning to use this package with Symfony and PayumBundle, you can use the following configuration.
- Register the gateway factory in your
services.yaml
:
Ksolutions\PayumPaynow\PaynowGatewayFactory: class: Payum\Core\Bridge\Symfony\Builder\GatewayFactoryBuilder arguments: [ Ksolutions\PayumPaynow\PaynowGatewayFactory ] tags: - { name: payum.gateway_factory_builder, factory: paynow }
- Add the following configuration to your
payum.yaml
:
payum: gateways: paynow: factory: paynow api_key: 'your-api-key' signature_key: 'your-signature-key' sandbox: true # or false in production
Payment notification
To handle payment notifications, you need to configure your notification URL in the Paynow.pl panel.
In such route you should fetch the Payment and call Notify
action on the gateway.
// logic to fetch the payment by 'paymentId' from notification body $gateway = $payum->getGateway('paynow'); $gateway->execute(new Notify($payment));
You should return 202 Accepted
status code if the notification was processed successfully.
Return 400 Bad Request
if you were not able to process the notification.
Contribution
I'm not actively developing this package, so you're welcome to contribute.
Feel free to create a pull request. Be sure to add yourself to the contributors list below.
Contributors
- Author: Kacper Smółkowski