Git Product home page Git Product logo

laravel-shopify's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-shopify's Issues

php 7.2 required

Using version ^2.0 for oseintow/laravel-shopify
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- illuminate/support v6.8.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.7.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.6.2 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.6.1 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.6.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.5.2 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.5.1 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.5.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.4.1 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.3.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.2.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.1.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.0.4 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.0.3 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.0.2 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.0.1 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- illuminate/support v6.0.0 requires php ^7.2 -> your PHP version (7.1.33) does not satisfy that requirement.
- oseintow/laravel-shopify v2.0.0 requires illuminate/support ^6.0 -> satisfiable by illuminate/support[v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.2.0, v6.3.0, v6.4.1, v6.5.0, v6.5.1, v6.5.2, v6.6.0, v6.6.1, v6.6.2, v6.7.0, v6.8.0].
- Installation request for oseintow/laravel-shopify ^2.0 -> satisfiable by oseintow/laravel-shopify[v2.0.0].

Issue installing with Laravel 8.0

I have been trying to install this dependency on my Laravel 8.0 application, but it fails. You can see here the message of error I'm getting:

Captura de Pantalla 2021-01-21 a la(s) 4 35 09 a  m

Any idea of how can I fix this? I have been looking for a solution on the internet but seems like nobody has had this issue with Laravel 8.0 yet.

I attach the exact log error here:
Problem 1 - Root composer.json requires oseintow/laravel-shopify ^2.0 -> satisfiable by oseintow/laravel-shopify[v2.0.0]. - oseintow/laravel-shopify v2.0.0 requires guzzlehttp/guzzle ^6.2 -> found guzzlehttp/guzzle[6.2.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.2).

Laravel 7 conflict with illuminate/support

Hello, when trying to install it gives the following error due to conflicts. as investigated is why:

The laravel/framework already has illuminate/support included in the installation.

It gives the following error in console when running composer require oseintow/laravel-shopify:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires oseintow/laravel-shopify ^2.0 -> satisfiable by oseintow/laravel-shopify[v2.0.0].
    - oseintow/laravel-shopify v2.0.0 requires illuminate/support ^6.0 -> found illuminate/support[v6.0.0, ..., 6.x-dev] but these were not loaded, likely because it conflicts with another require.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

If I try to install composer require illuminate/support:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires illuminate/support ^8.39, found illuminate/support[v8.39.0, 8.x-dev] but these were not loaded, likely because it conflicts with another require.


Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Response data dropped by makeRequest

makeRequest does the following:
return (is_array($responseBody) && (count($responseBody) > 0)) ? array_shift($responseBody) : $responseBody;

Because of the array_shift it drops "scope" from the response from "admin/oauth/access_token", which is
{ "access_token": "f85632530bf277ec9ac6f649fc327f17", "scope": "write_orders,read_customers" }

process_shopify_data -> process_oauth_result

Hi there, just working my way through your repository and noticed your instructions refer to the following:

$redirectUrl = "http://mydomain.com/process_shopify_data";

but then go on to create a route:

Route::get("process_oauth_result",function(\Illuminate\Http\Request $request)

suggest changing the $redirectUrl line to:

$redirectUrl = "http://mydomain.com/process_oauth_result";

Shopify application proxy signature can not be verified

According to Shopify documentation (https://help.shopify.com/api/guides/application-proxies) "Security: Calculate a digital signature" the proxy signature can be verified in the same way as "hmac" in requests.

It the code of public function verifyRequest($queryParams) something seems to be missed and the calculation is not done:
$hmac = $queryParams['hmac'] ?? ''; unset($queryParams['signature'], $queryParams['hmac']);
and 'signature' does not take part in verification.

404 GET Request

Can we treat 404 (not found) GET response as an empty string instead of an error?
For example, in my case, I'm using a webhook and find a product to determine if it does exist. Since ShopifyException class always return if error is 400 and above, my webhook tends to fail everytime a product is not existing.

What I would like to get is an empty string rather than returning the ShopifyException class when error 404 triggers.

Is this fair or I am missing something?

Your response is much appreciated.

Thanks,
Reymark

Release master to tag

Can you please release master to a tag please? Need those key and secret methods.

Post Order Status

Hi,
thanks for the package.. im running into one issue though..
here is my post request to update one order to fulfilled state..

$orderFulfillment = Shopify::setShopUrl($retrieveShopifyStore->EndPoint)
            ->setAccessToken($retrieveShopifyStore->ApiKey)
            ->post('admin/orders/4333444701/fulfillments.json');
               dd($orderFulfillment);

where do i have to add this fulfillment data?

                     {
                      "fulfillment": {
                        "line_items": [
                          {
                            "id": 7877024425
                          }
                        ]
                      }
                    }

this does not work:

$orderFulfillment = Shopify::setShopUrl($retrieveShopifyStore->EndPoint)
            ->setAccessToken($retrieveShopifyStore->ApiKey)
            ->post('admin/orders/4333444701/fulfillments.json
                    {
                      "fulfillment": {
                        "line_items": [
                          {
                            "id": 7877024425
                          }
                        ]
                      }
                    }
                ');
               dd($orderFulfillment);

i would really appreciate if someone can tell me how to pass this into my request.
thanks.

RuntimeException: A facade root has not been set.

After a fresh installation of Laravel 5.4.27 and following the instructions in the README.md file for this package, when I try to access the 'install_shop' route, I get a RuntimeException of 'A facade root has not been set.'.

image

Also, can you please provide some additional information as to where and when to use the functions verifyRequest() and verifyWebhook()?

Appreciate any help.

Search Queries

Does this package not support simple search queries such as admin/customers/search.json?query=email:[email protected]? Using the package for this query returns a large amount of customers, but when I use the query in Node or in my browser it returns one. What gives?

Create Script Post Data Format

I want To write Script in Shopify Script Tag When Someone installed the app.

Here Is Th Code Which I Used
Shopify::setShopUrl($shop)->setAccessToken($access_token)->post("admin/script_tags.json", [ "script_tag"=> [ "event"=> "onload", "src"=> "https://xpressrevolution.in/social_share.js" ] ]);

Please Help In That

Shopify API Limit Throttling

Shopify API uses a bucket for api limiting and it'd be super super useful to add it automatically to your calls (get, post, put etc) that it automatically sleeps if it gets close. You can use something like this (except this was used with Guzzle pool, so needs change):

// Respect rate limit
$rateLimit = explode('/', $response->getHeader('x-shopify-shop-api-call-limit')[0]);
$volume = intval($rateLimit[0], 10);
$limit = intval($rateLimit[1], 10);
$limitPercentage = ($volume / $limit) * 100;

// Let user know about success
$this->info(sprintf(
    'Shopify API use at %0.2f%%',
    number_format($limitPercentage)
));

// Throttle sleep
if ($limitPercentage > 70) {
    sleep(1);
}

Not able to verify webhook

I have used most of the functions from your package and all work great, except webhook.
The result always return empty. Logs "verification failed" message
public function verifyWebhook(Request $request)
{
$data = $request->getContent();
$hmacHeader = $request->server('HTTP_X_SHOPIFY_HMAC_SHA256');

if (Shopify::verifyWebHook($data, $hmacHeader)) {
    logger("verification passed");
} else {
    logger("verification failed");
}

}

registering a webhook

I am trying to register a webhook using api

$webhook = Shopify::setShopUrl($shopUrl)->setAccessToken($accessToken)->post("admin/webhooks.json", ['webhook' => 
					['topic' => 'orders/create',
					'address' => 'https://c024bd9f.ngrok.io/api/uu',
					'format' => 'json'
					]
				]);
	print_r($webhook);

output: Illuminate\Support\Collection Object ( [items:protected] => Array ( [id] => 469747493 [address] => http://c024bd9f.ngrok.io/api/uu [topic] => orders/create [created_at] => 2017-09-11T09:26:05-04:00 [updated_at] => 2017-09-11T09:26:05-04:00 [format] => json [fields] => Array ( ) [metafield_namespaces] => Array ( ) ) )

There is no error but I am not able to create the webhook. Please suggest how to do that. Thanks

Edit: Problem solved! It seems it doesn't add webhook in settings->notification->webhook section of shopify but it does register the webhooks.

not compatible with 5.4

The share function is no longer available in the service container.

To update we just have to change line 38 to this:
$this->app->singleton('shopify', function($app)

Afterwards everything will work in 5.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.