NATS4 API Get Payment Data
From TMM Wiki
Jump to navigationJump to searchThe printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This feature is not yet available
Parameters
get_payment_data accepts the following parameters
- loginid - filter for a specific affiliate using their ID
- filter_inhouse - Set to 1 to exclude in-house affiliates from the results
- start_date - any string accepted by PHP strtotime
- end_date - any string accepted by PHP strtotime
- payvia_type_id - pass a numeric ID to limit to a specific payvia type
- payment_type - pass a numeric ID to limit to a specific payment type
- open - 0 or 1, hide or show open payments in the output
- stored - 0 or 1, hide or show stored payments in the output
- paid - 0 or 1, hide or show paid payments in the output
Example
NuSOAP Example (continuing from main article NuSOAP Example):
//get all payments for loginid 4 $api_function = "get_payment_data"; $loginid=4; $arguments = Array( Array( 'loginid' => $loginid, 'open' => 1, 'stored' => 1, 'paid' => 1, ), ); $result = $client->call($api_function , $arguments, 'natsapiadmin_wsdl'); var_dump($result);
Output:
Array ( [0] => Array ( [0] => Array ( [loginid] => 4 [stored] => Array ( [0] => Array ( [paymentid] => 2 [loginid] => 4 [payvia_type_id] => 1 [payvia_type_nice] => Check ($-1.00) [start] => 1412136000 [end] => 1413345600 [type] => 50 [type_nice] => Account Rep Payment [amount] => 3000 [stored] => 1425272400 [paid] => 0 [paid_reference] => [received] => 0 ) ) [open] => Array ( [0] => Array ( [paymentid] => 10 [loginid] => 4 [payvia_type_id] => 1 [payvia_type_nice] => Check ($-1.00) [start] => 1420088400 [end] => 1421298000 [type] => 50 [type_nice] => Account Rep Payment [amount] => 3000 [stored] => 0 [paid] => 0 [paid_reference] => [received] => 0 ) ) [paid] => Array ( [0] => Array ( [paymentid] => 5 [loginid] => 4 [payvia_type_id] => 1 [payvia_type_nice] => Check ($-1.00) [start] => 1425272400 [end] => 1425272400 [type] => 5 [type_nice] => Manual Invoice [amount] => 5500 [stored] => 1425272400 [paid] => 1425272400 [paid_reference] => [received] => 0 ) ) ) ) )