We recommend using Composer for installation and update management. To add CRM Stripe extension to your REMP CRM application use following command:
composer require remp/crm-privatbankar-moduleEnable installed extension in your app/config/config.neon file:
extensions:
# ...
- Crm\PrivatbankarModule\DI\PrivatbankarModuleExtensionSeed Privatbankar payment gateway and its configuration:
php bin/command.php application:seedEnter Stripe API keys to CRM
- Visit to CRM admin settings (gear icon) - Payments
- Enter Privatbankar source
- Enter Privatbankar mode key
You can obtain source by contacting Privatbankar gateway operators directly. You'll be required to enter callback URLs for different scenarios (change the domains based on your configuration):
url_success: http://crm.press/privatbankar/return/thankyouurl_error: http://crm.press/privatbankar/return/errorurl_cancel: http://crm.press/privatbankar/return/cancelurl_timeout: http://crm.press/privatbankar/return/timeouturl_ipn: http://crm.press/api/v1/privatbankar/ipn (make sure this URL is accessible from the Internet)
Add gateway to your sales funnel configuration - available at funnel detail page in CRM admin. If the gateway is configured correctly, there's nothing else required.
Please be aware, that payment is confirmed only after the Instant Payment Notification (IPN) is received.
You can test the configuration by using privatbankar-sample funnel, which is seeded during installation. If everything works, don't forget to disable the funnel so it's not accessible in production.
The message which user sees while he/she waits for the confirmation approval is extendable/replaceable with widgets. You can:
-
In your own module, create new widget and extend the message displayed to user or attach your own behavior.
public function registerLazyWidgets(\Crm\ApplicationModule\Widget\LazyWidgetManagerInterface $lazyWidgetManager) { $lazyWidgetManager->registerWidget( 'privatbankar.return.pending', CustomConfirmationWidget::class, 200 ); }
-
In your own module, remove the default widget in case you don't want to display the original "confirmation pending" message.
public function registerLazyWidgets(\Crm\ApplicationModule\Widget\LazyWidgetManagerInterface $lazyWidgetManager) { $lazyWidgetManager->removeWidget( 'privatbankar.return.pending', \Crm\PrivatbankarModule\Components\ConfirmationPendingWidget::class, ); }
