Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bigcommerce\Api\NetworkError #291

Open
mareeshwarantcs opened this issue May 17, 2023 · 0 comments
Open

Bigcommerce\Api\NetworkError #291

mareeshwarantcs opened this issue May 17, 2023 · 0 comments

Comments

@mareeshwarantcs
Copy link

mareeshwarantcs commented May 17, 2023

I tried to get the products count from my store, but i faced this issue. Plz help me to fix this issue or give the source code to connect the bigcommerce api to get the expect result

Expected behavior

Get Product Count from my store

Actual behavior

Ref: https://nimb.ws/Yjfaul

Steps to reproduce behavior

<?php
namespace App\Http\Controllers;
use Bigcommerce\Api\Client as Bigcommerce;
use Illuminate\Http\Response;
use Illuminate\Http\Request;
use Bigcommerce\Api\NetworkError;

class AppController extends Controller
{
	public function test(Request $request){

		$object = new \stdClass();
		$object->client_id = 's4q6oeuf3p3kvc5jvjfgy6grsq0y0w';
		$object->client_secret = '3a687f024482cb1193cc2a7c087df6a201334083749635e8446829a281fc92';
		$object->redirect_uri = "https://zamplebox.enterpriseapplicationdevelopers.com/index.php/oauth";
		$object->code = $request->get('code');
		$object->context = $request->get('context');
		$object->scope = $request->get('scope');

		$authTokenResponse = Bigcommerce::getAuthToken($object);
		
		$count = Bigcommerce::getProductsCount();

		echo "Product Count is ".$count;
	}
}

?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant