You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHPShopify uses curl extension for handling http calls to the API. So you need to be have enabled the curl extension.
22
-
>However if you prefer to use any other available package library for handling HTTP calls, you can easily do so by modifying 1 line in each of the `get()`, `post()`, `put()`, `delete()` methods in `PHPShopify\ShopifyAPI` class.
21
+
PHPShopify uses curl extension for handling http calls. So you need to have the curl extension installed and enabled with PHP.
22
+
>However if you prefer to use any other available package library for handling HTTP calls, you can easily do so by modifying 1 line in each of the `get()`, `post()`, `put()`, `delete()` methods in `PHPShopify\HttpRequestJson` class.
23
23
24
24
## Usage
25
25
26
26
You can use PHPShopify in a pretty simple object oriented way.
27
27
28
28
#### Configure ShopifyClient SDK
29
-
If you are using your own private API, provide the ApiKey and Password. For Third party apps, use the permanent access token which you have got from the app.
29
+
If you are using your own private API, provide the ApiKey and Password.
30
30
31
31
```php
32
32
$config = array(
33
33
'ShopUrl' => 'yourshop.myshopify.com',
34
34
'ApiKey' => '***YOUR-PRIVATE-API-KEY***',
35
35
'Password' => '***YOUR-PRIVATE-API-PASSWORD***',
36
36
);
37
+
38
+
PHPShopify\ShopifyClient::config($config);
37
39
```
38
40
39
-
Or
41
+
For Third party apps, use the permanent access token.
> You can use the same page for creating the request and getting the access token. In that case just skip the 2nd parameter `$redirectUrl` while calling `createAuthRequest()` method. The AuthHelper class will do the rest for you.
0 commit comments