Description

This function sets the status of an item or items in the cPanel Market pending queue.

Examples


https://hostname.example.com:2083/cpsess##########/execute/Market/set_status_of_pending_queue_items?provider=cPStore&order_item_id=8675309&status=confirmed

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Set the status of 8675309 item in the queue to confirmed status.
$davidbowielives = $cpanel->uapi(
    'Market', 'set_status_of_pending_queue_items',
    array(
        'provider'        => 'cPStore',
        'order_item_id'   => '8675309',
        'status'          => 'confirmed'
    )
);

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Set the status of 8675309 item in the queue to confirmed status
my $davidbowielives = $cpliveapi->uapi(
    'Market', 'set_status_of_pending_queue_items',
    {
        'provider'         => 'cPStore',
        'order_item_id'    => '8675309',
        'status'           => 'confirmed'
    }
);

 

<!--  Set the status of 8675309 item in the queue to confirmed status -->
[% execute('Market', 'set_status_of_pending_queue_items', { provider => 'cPStore','order_item_id'=>'8675309','status' => 'confirmed' } ) %]

 

uapi --user=username Market set_status_of_pending_queue_items provider=cPStore order_item_id=8675309 status=confirmed

Success:

 

{    
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  
   }
}

Failure:

 

{  
   "data":{  
      "error_type":"EntryDoesNotExist",
      "order_item_ids":[  
         8675309,
         5551212
      ]
   },
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   }
}

   

Parameters

ParameterTypeDescriptionPossible valuesExample
providerstring

Required

The cPanel Market provider's name.

A valid string.

cPStore
order_item_idstring

Required

The ID of the ordered item.

To set the status for multiple items, duplicate or increment the parameter name. For example, to change the status for three certificates, use the order_item_id parameter multiple times or use the order_item_id-1, order_item_id-2, and order_item_id-3 parameters.

A valid string.8675309
statusstring

Required

The new status of the item in the cPanel Market pending queue.

  • confirmed — The system confirmed payment for the item with the provider.
confirmed

 

Returns

The function only returns these values if the user or users do not have the order_item_id item in the cPanel Market pending queue.

ReturnTypeDescriptionPossible valuesExample
error_typestring

The type of error that the function encountered.

We introduced this return in cPanel & WHM version 56.1.

  • EntryDoesNotExist — The returned order_item_ids do not exist in the cPanel Market pending queue for the user.
cPStore
order_item_idsarray

An array that lists order item IDs which do not exist in the cPanel Market pending queue for the user.

We introduced this return in cPanel & WHM version 56.1.

A list of order item IDs.8675309