PickBazar Documentation
WelcomeHow It WorksGetting StartedFeaturesAvailable ScriptsCustomizationStyles and AssetsUtilities
Back-End Integration
Deployment
Update
SEO and Analytics
API
Social LoginOTP (Mobile Number Verification)TranslationMultiVendorExport ImportFAQSupportVersions

FAQ:

How to configure Stripe payment gateway?

To configure Stripe payment gateway,

  1. At first, create a developer account from stripe developer dashboard (https://dashboard.stripe.com/)
  2. log in to that account
  3. Then go to the Developer -> API Keys section and on that section create an API key. After creating, you'll get one Secret key and one Publishable key.StripeDev.png
  4. Then copy Secret key to your pickbazar api->.env

SetStripeAPI.png

  1. And similarly, add Publishable key to your frontend/shop-rest/.env for rest and frontend/shop-graphql/.env for graphql. FrontStripe.png

After configuration, make sure you rebuild your project using this command,

For REST API

yarn build:shop-rest
yarn build:admin-rest

And for GraphQL,

yarn build:shop-gql
yarn build:admin-gql

Why am I facing "You may need an appropriate loader to handle this file type" during running shop rest?

Ans: Please run yarn clean then yarn then run yarn dev:shop-rest

I am trying to upload files but not working.

Before upload files you need to ensure few things. First of all the you have to check which disk are you using. You can find it in api/packages/marvel/src/Config/media-library.php file. Check the disk_name. If you are using s3 then you have to configure s3 details in .env file. You can also use your local server to store images. For that disk_name will be public. Make sure you have run php artisan storage:link otherwise the images will not be available as public. Another thing is you must have to set the APP_URL in .env file properly. If you follow our aws doc properly then the APP_URL value should be your_domain/api

I am changing schema files but changes is not working

Your changes might not work because schema is cached. SO you might need to clear schema cache using the below command php artisan lighthouse:clear-cache.

Changing .env files but not getting the changes

Run Below command php artisan optimize:clear

Changing route but not getting the changes.

Run php artisan optimize:clear or php artisan route:clear

I have set STRIPE_API_KEY in .env but still getting error.

In some cases STRIPE_API_KEY value can't read from .env in those cases you have to put the key in the config file directly in api/packages/marvel/src/Config/laravel-omnipay.php

  1. Getting error on forget password email sending Make sure you have run the php artisan marvel:install commands successfully and copied the necessary email templates to your resources folder. You can also do it by php artisan marvel:copy-files command.

    NB: This same issue can occur during order creation.

Can I use it with my existing laravel?

Yes, you can. Follow the below steps.

  • Make sure you are using laravel 8.
  • Copy api/packages folder from the downloaded files into your laravel root folder.
  • Put below code in your laravel composer.json file into require section.
"ignited/laravel-omnipay": "dev-master",
"omnipay/common": "dev-master",
"omnipay/stripe": "dev-master",
"pickbazar/shop": "dev-master"
  • Put below code in bottom of your composer.json. If you already have an repositories section then put code inside repositories to your existing repositories
"repositories": {
"pickbazar/shop": {
"type": "path",
"url": "packages/marvel"
},
"ignited/laravel-omnipay": {
"type": "path",
"url": "packages/laravel-omnipay"
},
"omnipay/common": {
"type": "path",
"url": "packages/omnipay-common"
},
"omnipay/stripe": {
"type": "path",
"url": "packages/omnipay-stripe"
}
}
  • Now run composer install
  • Copy necessary env variables from .env.example to you env file.
  • Run php artisan marvel:install and follow necessary steps.
  • To run server php artisan serve
  • For image upload to work properly you need to run php artisan storage:link.

Why am I getting Access denied for user?

navigate to api then run ./vendor/bin/php down -v. It will delete any of your existing mysql volumes. Now run ./vendor/bin/php up -d on same directory or run bash install.sh on root directory

Why am I getting permission issue during deployment?

Run below commands for fixing permission issue in your laravel app during deployment

sudo chown -R $USER:www-data storage
sudo chown -R $USER:www-data bootstrap/cache
sudo chown -R www-data:www-data storage
sudo chown -R www-data:www-data bootstrap/cache

Why am I getting "The GET method is not supported for this route. Supported methods: HEAD"?

Run php artisan optimize:clear

I am getting "Cannot use 'Mixed' as class name as it is reserved" after access graphql endpoint.

You are using the application in PHP 8. Downgrade it to PHP 7.4. Mixed is a reserved word in PHP 8.