· 8 years ago · Dec 14, 2017, 09:10 PM
1$secret_key = 'WQHcJ)PzF2SUCEi3';
2$remote_url = 'https://wams.tech/api-dev/';
3
4$action = 'CREDIT';
5$account = 'robert.petitto@woodward.edu';
6$amount = 10;
7$ref = 'metaverse';
8//$ref_id = 0;
9$entry = 'Points for viewing metaverse';
10//$data = 'optional extra';
11$point_type = 'mycred_defaut';
12$host = 'https://www.gonmeta.io';
13
14$token = md5( $host . $action . $amount . $secret_key );
15
16$request = array(
17 'method' => 'POST',
18 'body' => array(
19 'action' => $action,
20 'account' => $account,
21 'amount' => $amount,
22 'ref' => $ref,
23 'ref_id' => $ref_id,
24 'type' => $point_type,
25 'entry' => $entry,
26 'data' => $data,
27 'token' => $token,
28 'host' => $host
29 )
30);
31
32$response = wp_remote_post( $remote_url, $request );