This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Need help creating a custom payment type module

Hello,

I'm using Commerce on a Drupal 7 site.

I currently offer paypal and cash/check payment options.

I would like to add another, Common Good Card. Here are the specs from their website:

Required parameters

company: Seller’s Common Good account ID.

SQLite Query: Drupal redirects to /core/install.php

Drupal redirects to /core/install.php when I try to open page including a SQLite query

I have a Drupal site on a web server. On one page of the site, I want to print out information from a sqlite database. But if I enter the url to the page, I get redirected to /core/install.php

I integrated the database into the /sites/defualt/settings.php with the following code:

$databases['external']['default'] = [
'driver' => 'sqlite',
'database' => '/gesamtausgabe_2019.sqlite',
];

Listen for a module function

How to update type of field created with ContentEntityBase

In FillPDF, class FillPdfFormField extends ContentEntityBase. The method ::baseFieldDefinitions() uses BaseFieldDefinition::create() to create a bunch of fields. I need to write an update hook to change one of these from type string to string_long.

What is going on with this code?

I am trying to figure out why something weird is happening. I have the following in my_module.routing.yml:

my_module.test:
  path: '/my-module/test'
  defaults:
    _controller: '\Drupal\my_module\Controller\TestController::view'
    _title_callback: '\Drupal\my_module\Controller\TestController::getTitle'
  requirements:
    _permission: 'access content'

My Controller class is this:

Is it always necessary to do a dependency injection for a service within a class

Hey, there!

Is it always necessary to do a dependency injection for a service within a class if we will only use that service once inside the class? According to the Drupal documentation, is that recommended, but for practical purposes, is that useful?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions