os2forms / os2forms_payment
OS2Forms payment
Package info
github.com/itk-dev/os2forms_payment
Type:drupal-module
pkg:composer/os2forms/os2forms_payment
1.2.0
2026-10-23 12:14 UTC
Requires
- php: ^8.1
- drupal/advancedqueue: ^1.0
- drupal/webform: ^6.1
- drush/drush: ^11 || ^12 || ^13
- symfony/options-resolver: ^5.4 || ^6.0 || ^7.0
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^0.7.1
- drupal/coder: ^8.3
- ergebnis/composer-normalize: ^2.47
- mglaman/phpstan-drupal: ^2.0
- palantirnet/drupal-rector: ^1.0
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-23 12:17:51 UTC
README
Installation
composer require os2forms/payment drush pm:enable os2forms_payment
Define settings in settings.local.php:
// CHECKOUT_KEY, both test and production, can be retrieved from Nets admin panel $settings['os2forms_payment']['checkout_key'] = ''; // SECRET_KEY, both test and production, can be retrieved from Nets admin panel $settings['os2forms_payment']['secret_key'] = ''; // Page containing terms and conditions URL, including protocol. $settings['os2forms_payment']['terms_url'] = ''; // Page containing merchant terms URL, including protocol. $settings['os2forms_payment']['merchant_terms_url'] = ''; // Boolean describing whether the module is operated in test mode $settings['os2forms_payment']['test_mode'] = TRUE;
Setup
Make sure that the setting values described above are set.
- Create a new webform
- Goto Indstillinger -> Formular -> Form preview settings -> Enable preview page (Obligatorisk)
- Add a payent element on the form
- Go to the payment element settings and select the element containing the amount to pay (field types: Skjult, Vælg).
- Test the form. The Nets gateway should appear on the Review page.
Development
We use DDEV Drupal Contrib for development1.
Start the show by running
task ddev:start
Run task to see other useful development tasks.
Footnotes
-
The DDEV environment has been created by running
ddev config --project-type=drupal10 --docroot=Drupal ddev add-on get ddev/ddev-drupal-contrib ddev start ddev poser --no-interaction ddev symlink-project # Detect expected Drupal and PHP versions. ddev config --update