|
4 | 4 | [](https://packagist.org/packages/shopifychamp/shopify-api-php-sdk) |
5 | 5 | [](https://packagist.org/packages/shopifychamp/shopify-api-php-sdk) |
6 | 6 |
|
7 | | -PHP SDK helps to connect with shopify [Custom App](https://shopify.dev/concepts/apps#custom-apps), [Public App](https://shopify.dev/concepts/apps#public-apps) and [Private App](https://shopify.dev/concepts/apps#private-apps) using [REST Api](https://shopify.dev/docs/admin-api/rest/reference) and [Graphql](https://shopify.dev/docs/admin-api/graphql/reference). |
| 7 | +PHP SDK helps to connect with shopify [Public App](https://shopify.dev/concepts/apps#public-apps) and [Private App](https://shopify.dev/concepts/apps#private-apps) using [REST Api](https://shopify.dev/docs/admin-api/rest/reference) and [Graphql](https://shopify.dev/docs/admin-api/graphql/reference). |
8 | 8 | * Call GET, POST, PUT and DELETE RestApi method. |
9 | 9 | * Process GraphQL Admin API for [Query root](https://shopify.dev/docs/admin-api/graphql/reference/queryroot) and [Mutations](https://shopify.dev/docs/admin-api/graphql/reference/mutation). |
10 | 10 | * Queryroot is used to get resources and mutations is used to update resources (products/orders/customers). |
@@ -72,30 +72,6 @@ $ composer require shopifychamp/shopify-api-php-sdk |
72 | 72 | header('Location: '.urldecode($client->prepareAuthorizeUrl($redirect_url))); |
73 | 73 | } |
74 | 74 | ``` |
75 | | -#### 3. For Custom App (Under Development) |
76 | | -Note: Oauth process is similar to public app. To authenticate with Shopify by using a custom app, you need to generate an [installation link](https://shopify.dev/tutorials/authenticate-a-custom-app-with-oauth#create-a-custom-app-and-generate-an-installation-link) from your Partner Dashboard. |
77 | | -* To create instance of `Client` class, need `shop`, `api_key`, `api_secret_key` of custom app. |
78 | | - |
79 | | - ``` |
80 | | - <?php |
81 | | - require(__DIR__ . '/../vendor/autoload.php'); |
82 | | - use Shopify\PuplicApp; |
83 | | - |
84 | | - $api_params['version'] = '2019-10'; |
85 | | - $client = new Shopify\PublicApp($shop, $api_key, $api_secret_key, $api_params); |
86 | | - ``` |
87 | | -* Copy link from `Merchant install link` section in Custom App and run in browser then it redirect to your url provied provided while creating custom app. |
88 | | - ``` |
89 | | - if(isset($_GET['code'])) |
90 | | - { |
91 | | - //get access_token after authorization of public app |
92 | | - if($access_token = $client->getAccessToken($_GET)){ |
93 | | - //set access_token for api call |
94 | | - $client->setAccessToken($access_token); |
95 | | - $response = $client->call('GET','products',['limit'=>250]); |
96 | | - } |
97 | | - } |
98 | | - ``` |
99 | 75 | ### Call REST Api |
100 | 76 | * Get Products with limit 250 with `call()` function |
101 | 77 | ``` |
|
0 commit comments