-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathexpress.server.php
68 lines (41 loc) · 1.24 KB
/
express.server.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
error_reporting(E_ALL);
ini_set("display_errors",1);
use zipMoney\Request;
use zipMoney\Exception;
use zipMoney\Configuration;
use zipMoney\Webhook\Express;
require_once dirname(__FILE__).'/vendor/autoload.php';
Configuration::$merchant_id = 4;
Configuration::$merchant_key = "4mod1Yim1GEv+D5YOCfSDT4aBEUZErQYMJ3EtdOGhQY=";
Configuration::$environment = Configuration::ENVIRONMENT_TEST;
class ZipMoneyExpress extends Express
{
protected function _actionGetQuoteDetails($params)
{
$response = array("_actionGetQuoteDetails");
$this->sendResponse($response);
}
protected function _actionGetShippingMethods($params)
{
$response = array("_actionGetShippingMethods");
$this->sendResponse($response);
}
protected function _actionConfirmShippingMethods($params)
{
$response = array("_actionConfirmShippingMethods");
$this->sendResponse($response);
}
protected function _actionConfirmOrder($params)
{
$response = array("_actionConfirmOrder");
$this->sendResponse($response);
}
}
try{
$expressTest = new ZipMoneyExpress();
$action = trim($_GET['action']);
$expressTest->listen($action);
} catch(Exception $e){
echo $e->getMessage();
}