01-13-2025, 11:36 AM
Hi everyone,
I'm working on a feature where an account needs to be automatically created on my app (hosted on a separate server) when a custom service is activated for a client order. I am calling an api inside function called
to handle this on Admin PanelĀ I've configured a custom service with an order form containing:
I need to:
I'm working on a feature where an account needs to be automatically created on my app (hosted on a separate server) when a custom service is activated for a client order. I am calling an api inside function called
Code:
action_activate(\Model_ClientOrder $order)
- Two text fields (e.g., "Device Name," "Device Number")
- A radio button with two options (e.g., "3G," "4G")
- In Configuration, two custom parameters with pre-defined values (e.g., "Admin Email: [email protected]," "Password: abcd").
I need to:
- Retrieve the values entered in the order form fields (text fields and radio button).
- Retrieve the values of the custom parameters.
- Use this data to make a POST API call to my app's server to create the account. This API call requires both body data (from the form) and authentication (using the admin email and password).
How to fetch these value inside function action_activate(\Model_ClientOrder $order)?