Repository navigation
Expand file tree
/
Copy pathFeedStatusExample.php
More file actions
45 lines (38 loc) · 1.57 KB
/
Copy pathFeedStatusExample.php
File metadata and controls
45 lines (38 loc) · 1.57 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
#-------------------------------------------------------------------------------
# INCLUDE THE CONFIGURATION FILE
#
# This file contains some default environment configuration which are used to
# ensure your examples will run.
#-------------------------------------------------------------------------------
require 'config.php';
#-------------------------------------------------------------------------------
# SETUP CLIENT
#
# Edit your credentials in config.php to use the examples.
#-------------------------------------------------------------------------------
$client = new Vleks\SDK\Client(
VLEKS_API_PUBLIC_KEY, VLEKS_API_PRIVATE_KEY,
VLEKS_MERCHANT_ID, VLEKS_API_CLUSTER
);
#-------------------------------------------------------------------------------
# CHECK FEED PROCESS STATUS
#-------------------------------------------------------------------------------
try {
$request = new Vleks\SDK\Requests\FeedStatus(array (
'Feed' => array (
array ('RequestID' => '-- FEED REQUEST ID --'),
array ('RequestID' => '-- FEED REQUEST ID --')
)
));
$result = $client->getFeedStatus($request);
if ($result->hasFeeds()) {
foreach ($result->getFeeds() as $feed) {
var_dump ($feed->getRequestID() . ':' . $feed->getStatus());
}
}
} catch (Vleks\SDK\Exceptions\ClientException $clientException) {
var_dump($clientException->getMessage());
} catch (Vleks\SDK\Exceptions\ServiceException $serviceException) {
var_dump($serviceException->getMessage());
}