-
Notifications
You must be signed in to change notification settings - Fork 69
Option_Create
Jacob McConnell edited this page Jun 10, 2014
·
2 revisions
The Twocheckout_Option class provides methods to create, retrieve, update and delete options and will return an Array or JSON response depending on your format specification.
##Method
###create
Use to create an option.
####Arguments
- array Array
- Array containing create_option parameters in key => value pairs. Parameters -> API Create Option
####Returns
Returns an Array or JSON depending on your format specification.
####Example Usage:
Twocheckout::username('APIuser1817037');
Twocheckout::password('APIpass1817037');
$args = array(
'option_name' => 'Example Option',
'option_value_name' => 'Example Option Value Name',
'option_value_surcharge' => 1.00
);
$option = Twocheckout_Option::create($args);
####Example Response:
Array
(
[option_id] => 4838121600
[response_code] => OK
[response_message] => Option created successfully
)
Please feel free to contact 2Checkout directly for assistance with your integration.