Developer Center

Keeping Custom Data

You may need to retain information obtained from the payment service provider before referring the customer to the payment service provider. To do this, follow the instructions below.

Saving Data

The "custom_data" function takes two parameters. The first parameter is mandatory. If the "$checkout" variable is empty in your module class, the second parameter must also be filled.

In the first parameter, define the data you want to store as an "array".

self::save_custom_data([
    'custom_field1' => 123,
    'custom_field2' => 321,
]);

Calling Data

Using the "get_custom_data" function you can call the custom data you saved earlier. The function has one parameter. If the "$checkout" variable is empty in your module class, the parameter must be entered.

$data = self::get_custom_data();
echo  $data['custom_field1'].' - '.$data['custom_field2'];
3D Secure Obtaining Items

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2022. All Rights Reserved.
Join Our Discord Channel
Top