7
7
8
8
class Shopify extends AbstractProvider
9
9
{
10
- /**
11
- * Production Shopify domain.
12
- *
13
- * @const string
14
- */
15
- const BASE_SHOPIFY_DOMAIN = 'myshopify.com ' ;
16
-
17
10
/**
18
11
* The store name.
19
12
*
@@ -31,12 +24,12 @@ public function __construct($options = [], array $collaborators = [])
31
24
{
32
25
parent ::__construct ($ options , $ collaborators );
33
26
34
- if (empty ($ options ['store ' ])) {
35
- $ message = 'The "store " option not set. Please set a Store name. ' ;
27
+ if (empty ($ options ['shop ' ])) {
28
+ $ message = 'The "shop " option not set. Please set a Shop name. ' ;
36
29
throw new \InvalidArgumentException ($ message );
37
30
}
38
31
39
- $ this ->store = $ options ['store ' ];
32
+ $ this ->store = $ options ['shop ' ];
40
33
}
41
34
42
35
/**
@@ -46,7 +39,7 @@ public function __construct($options = [], array $collaborators = [])
46
39
*/
47
40
public function getBaseAuthorizationUrl ()
48
41
{
49
- return sprintf ('https://%s.%s /admin/oauth/authorize ' , $ this ->store , self :: BASE_SHOPIFY_DOMAIN );
42
+ return sprintf ('https://%s/admin/oauth/authorize ' , $ this ->store );
50
43
}
51
44
52
45
/**
@@ -58,7 +51,7 @@ public function getBaseAuthorizationUrl()
58
51
*/
59
52
public function getBaseAccessTokenUrl (array $ params )
60
53
{
61
- return sprintf ('https://%s.%s /admin/oauth/access_token ' , $ this ->store , self :: BASE_SHOPIFY_DOMAIN );
54
+ return sprintf ('https://%s/admin/oauth/access_token ' , $ this ->store );
62
55
}
63
56
64
57
/**
@@ -71,9 +64,8 @@ public function getBaseAccessTokenUrl(array $params)
71
64
public function getResourceOwnerDetailsUrl (AccessToken $ token )
72
65
{
73
66
return sprintf (
74
- 'https://%s.%s /admin/shop.json?access_token=%s ' ,
67
+ 'https://%s/admin/shop.json?access_token=%s ' ,
75
68
$ this ->store ,
76
- self ::BASE_SHOPIFY_DOMAIN ,
77
69
$ token ->getToken ()
78
70
);
79
71
}
0 commit comments