First you need to set the client id and client secret.
Use this method anywhere you want to use.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
$accessToken = $this->_netellerAccess();
$data_string = '{
"paymentMethod": {
"type": "neteller",
"value": "' . $net_val . '"
},
"transaction": {
"merchantRefId": "2336' . time() . '",
"amount": ' . $amount . '00,
"currency": "USD"
},
"verificationCode": "' . $net_sid . '"
}';
$token = $accessToken['accessToken'];
$curl = curl_init();
$headers = array("Content-Type:application/json", "Cache-Control:no-cache", "Authorization: Bearer $token");
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, "https://test.api.neteller.com/v1/transferIn");
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$serverOutput = curl_exec($curl);
$pres = json_decode($serverOutput)
|