Package Data | |
---|---|
Maintainer Username: | carlospalacin |
Maintainer Contact: | info@syscover.com (SYSCOVER GROUP SL) |
Package Create Date: | 2017-03-29 |
Package Last Update: | 2020-03-03 |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2025-01-29 15:17:37 |
Package Statistics | |
---|---|
Total Downloads: | 420 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 3 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Before install sycover/pulsar-market, you need install syscover/pulsar-core, syscover/pulsar-admin and syscover/pulsar-crm
1 - After install Laravel framework, execute on console:
composer require syscover/pulsar-market
Register service provider, on file config/app.php add to providers array
Syscover\Market\MarketServiceProvider::class,
2 - Execute publish command
php artisan vendor:publish --provider="Syscover\Market\MarketServiceProvider"
and
composer dump-autoload
3 - And execute migrations and seed database
php artisan migrate
php artisan db:seed --class="MarketTableSeeder"
4 - Execute command to load all updates
php artisan migrate --path=vendor/syscover/pulsar-market/src/database/migrations/updates
5 - Register TaxRule middleware on file app/Http/Kernel.php add to $middlewareGroups array in web group
'web' => [
...
\Syscover\Market\Middleware\TaxRule::class
],
6 - To run unit testing
./vendor/bin/phpunit
We indicate configuration variables available, to change them what you should do from the file environment variables .env
You can set a prefix for all your orders, for example, if you can set on all you orders the prefix ORDER, set this value on you .env file
MARKET_ORDER_ID_PREFIX=ORDER
To set default country to calculate tax, you can use this parameter, for example to change to US, set this value on you .env file
MARKET_DEFAULT_COUNTRY_TAX=US
Set default ID customer class value for calculate tax amount of products
MARKET_DEFAULT_CUSTOMER_CLASS_TAX=1
Cuando configuramos una regla de tasa podemos acotar la regla indicando país y áreas territoriales donde queremos aplicar dicha regla. También disponemos del campo ZIP donde podrmos usar un patrón. Si queremos aplicar esa tasa entre los ZIPs 28001 y 28099 podemos indicar el valor 280** en el campo ZIP.
A la hora de crear las reglas de impuestos es importante tener en cuenta los siguientes campos.
Prioridad En este apartado aplicamos un número para indicar la prioridad de este impuesto, cuando se aplica más de un impuesto. Si se aplican dos reglas fiscales con la misma prioridad, los impuestos se suman. Si se aplican dos impuestos con diferentes configuraciones de prioridad, entonces los impuestos se capitalizan en función del orden de prioridad. Cuando los impuestos están compuestos, el impuesto de la primera prioridad se calcula sobre el importe subtotal, y luego el impuesto de la segunda prioridad se calcula sobre el subtotal más el monto del primer impuesto prioritario.
Orden En este apartado aplicamos un número para indicar el orden en que se muestran las reglas fiscales en la página Administrar reglas impositivas.
Defines the types of prices that are introduced in products, this option is consulted when you create or update a product You have this values:
MARKET_PRODUCT_TAX_PRICES=1
Defines the types of prices that are introduced in shipping prices, this option is consulted when you create or update a shipping price
MARKET_TAX_SHIPPING_PRICES=1
Defines how you want display product prices You have this values:
MARKET_PRODUCT_TAX_DISPLAY_PRICES=1
Defines how you want display shipping prices
MARKET_TAX_SHIPPING_DISPLAY_PRICES=1
MARKET_PAYPAL_MODE=sandbox
MARKET_PAYPAL_SANDBOX_WEB_PROFILE=XX-XXXX-XXXX-XXXX-XXXX
MARKET_PAYPAL_SANDBOX_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
MARKET_PAYPAL_SANDBOX_SECRET=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
MARKET_PAYPAL_LIVE_WEB_PROFILE=XX-XXXX-XXXX-XXXX-XXXX
MARKET_PAYPAL_LIVE_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
MARKET_PAYPAL_LIVE_SECRET_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
If you want set shipping description in PayPal you mus to create the next key in common.php language file
paypal_shipping_description
If you want set item list description in PayPal you mus to create the next key in common.php language file
paypal_item_list_description
MARKET_REDSYS_MODE=test
MARKET_REDSYS_TEST_MERCHANT_NAME="MERCHANT NAME (TEST)"
MARKET_REDSYS_TEST_MERCHANT_CODE=xxxxxxxxx
MARKET_REDSYS_TEST_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
MARKET_REDSYS_LIVE_MERCHANT_NAME="MERCHANT NAME"
MARKET_REDSYS_LIVE_MERCHANT_CODE=xxxxxxxxx
MARKET_REDSYS_LIVE_KEY=xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxXx
You can register this events in app/Providers/EventServiceProvider.php to manage various actions.
protected $listen = [
...
'Syscover\...\Events\YourEvent' => [
'App\Listeners\YourListener'
],
...
];
Syscover\Market\Events\PaymentResponseSuccessful
Syscover\Market\Events\PaymentResponseError
Syscover\Market\Events\RedsysAsyncResponse
Syscover\Market\Events\RedsysResponseSuccessful
Syscover\Market\Events\RedsysResponseError
Syscover\Market\Events\PaypalResponseSuccessful
Syscover\Market\Events\PaypalResponseError