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

Show payment details in 'logged in' user 's order page

HI ALL, I have been working on a Drupal offsite payment module. I want that when a customer completes payment and place an order, additional information related to order (like transaction id, merchant reference number etc that's received in response from gateway side) gets captured in the order page of 'logged in' user. Check image below for reference :

Click here to see image

Display customised message in the order completion message

Hello All, I have been working on a Drupal offsite payment module. I want to display additional information related to order (like transaction id, merchant reference number etc that we get in response from gateway side)in the order completion message section. I have attached screenshot for reference. 

Click here

What I did: 

Custom composite - Default value setting

I have an Options element > Select type setup with custom options.  For this example, the custom options are different languages.  I would like the default value set for 'English' and am not sure what the YAML coding for default value should be for it.

The custom composite key for the Select type setup is 'autos_buying_a_car_language'.  The custom option/YAML coding is 'english: English'.

Thank you for your help!

New Custom Module with Schema Update

I've included a mfa.install file along with my module (mfa). After a few iterations my module now installs without errors but my two new tables are not added to the Drupal database. I uninstalled my module and reinstalled when fixing errors. Here is the contents of mfa.install: (I should not need a hook_update_N() function)

Get Drupal 10 Session outside Drupal

To get Userdata outside Drupal (old Version), I used the following PHP-Script:

//define('DRUPAL_ROOT', '/var/www/html/drupal' );
define('DRUPAL_ROOT', dirname(dirname(__DIR__)));
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

global $user;
$uname = $user->name;
$uid = $user->uid;
$urole1 = $user->roles['2'];
$urole2 = $user->roles['3'];
$urole2 = strtoupper($urole2);

The part to get Userdata in Drupal 10 I found:

Pages

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