users.search-paypal
users.search-paypal
users.search-paypal
Description
Search PayPal users by external transaction id
Input Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| paypal_rest_resource_id | (string) | yes | PP Rest resource_id |
| paypal_txn_id | (string) | yes | Old PP txn_id |
NOTE: one of above parameters is required!
Return
| Name | Type | Description |
|---|---|---|
| result | array | Result array with data |
Usage Example
<?php $curl = new \Dinke\CurlHttpClient; //setup payment url and timeout $payment_url = 'https://dev-payment.datingvip.com/api.json'; $timeout = 30; $curl->setCredentials('some-token', 'some-pass'); $post_data = array( 'cmd' => 'users.search-paypal', 'data' => array('email' => '123321123') ); $response = $curl->sendPostData($payment_url, $post_data, null, $timeout); if($response === false) { //handle errors } //decode json to get array $response = json_decode($response, true); var_dump($response);
Excepted output after running this script should be:
array (size=1)
'result' =>
array (size=8)
'code' => int 700
'status' => string 'Action completed succesfully' (length=28)
'command' => string 'users.search-paypal' (length=12)
'result' =>
array (size=1)
0 =>
array (size=7)
'system_id' => string 'dbt' (length=3)
'tracking_user' => string '30540107' (length=8)
'email' => string 'webdriver+4872@gmail.com' (length=24)
'name' => string 'Test Test' (length=9)
'request' =>
array (size=4)
'cmd' => string 'users.search-paypal' (length=12)
'data' =>
array (size=1)
'email' => string 'webdriver+4872@gmail.com' (length=24)
'token' => string 'some-token' (length=26)
'pass' => string 'some-pass' (length=32)
'ts' => int 1429564031
'origin_ip' => string '93.87.220.184' (length=13)
'errors' => nullReferenced Files
None
Subscribers
None
- Last Author
- aplawecki
- Last Edited
- Feb 17 2022, 06:11