diff --git a/app/Http/Controllers/Shop/PayboxController.php b/app/Http/Controllers/Shop/PayboxController.php index 61d751d9..cacf813e 100644 --- a/app/Http/Controllers/Shop/PayboxController.php +++ b/app/Http/Controllers/Shop/PayboxController.php @@ -16,6 +16,7 @@ class PayboxController extends Controller { dump($request->all()); exit; + return view('paybox.refused'); } diff --git a/app/Models/Shop/Article.php b/app/Models/Shop/Article.php index 89e36743..72d28f64 100644 --- a/app/Models/Shop/Article.php +++ b/app/Models/Shop/Article.php @@ -39,18 +39,7 @@ class Article extends Model implements HasMedia protected $table = 'shop_articles'; - protected $revisionEnabled = true; - - protected $keepRevisionOf = [ - 'article_nature_id', - 'product_type', - 'product_id', - 'ref', - 'name', - 'description', - 'visible', - 'homepage', - ]; + protected $dontKeepRevisionOf = ['updated_by', 'updated_at']; public function article_nature(): BelongsTo { diff --git a/app/Models/Shop/Customer.php b/app/Models/Shop/Customer.php index c73220d8..bb5c18f4 100644 --- a/app/Models/Shop/Customer.php +++ b/app/Models/Shop/Customer.php @@ -7,8 +7,8 @@ use App\Notifications\VerifyEmail; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -use Venturecraft\Revisionable\RevisionableTrait; use Staudenmeir\EloquentHasManyDeep\HasRelationships; +use Venturecraft\Revisionable\RevisionableTrait; use Yadahan\AuthenticationLog\AuthenticationLogable; class Customer extends Authenticatable diff --git a/app/Models/Shop/Delivery.php b/app/Models/Shop/Delivery.php index b70db943..e21a3bf5 100644 --- a/app/Models/Shop/Delivery.php +++ b/app/Models/Shop/Delivery.php @@ -72,7 +72,7 @@ class Delivery extends Model { return $query->whereIn($this->table.'.sale_channel_id', $ids); } - + public function scopeBySaleChannel($query) { return $query->where($this->table.'.sale_channel_id', 1); @@ -90,7 +90,7 @@ class Delivery extends Model public function scopeByCustomer($query, $customerId) { - return $query->whereHas('customers', function($query) use ($customerId) { + return $query->whereHas('customers', function ($query) use ($customerId) { return $query->byId($customerId); }); } diff --git a/app/Models/Shop/Invoice.php b/app/Models/Shop/Invoice.php index 802fac6f..00bc3f87 100644 --- a/app/Models/Shop/Invoice.php +++ b/app/Models/Shop/Invoice.php @@ -17,7 +17,7 @@ class Invoice extends Model protected $revisionCreationsEnabled = false; - protected $keepRevisionOf = ['status', 'total_taxed', 'shipping', 'total_shipped']; + protected $dontKeepRevisionOf = ['updated_by', 'updated_at']; public function payments() { diff --git a/app/Models/Shop/InvoicePayment.php b/app/Models/Shop/InvoicePayment.php index c38f7efc..e3c111fe 100644 --- a/app/Models/Shop/InvoicePayment.php +++ b/app/Models/Shop/InvoicePayment.php @@ -9,7 +9,7 @@ use Wildside\Userstamps\Userstamps; class InvoicePayment extends Model { use RevisionableTrait, Userstamps; - + protected $guarded = ['id']; protected $table = 'shop_invoice_payments'; @@ -36,7 +36,7 @@ class InvoicePayment extends Model public function scopeByOrder($query, $orderId) { - return $query->whereHas('order', function($query) use ($orderId) { + return $query->whereHas('order', function ($query) use ($orderId) { return $query->byOrder($orderId); }); } diff --git a/app/Repositories/Shop/Articles.php b/app/Repositories/Shop/Articles.php index da0c1637..cdcdc18b 100644 --- a/app/Repositories/Shop/Articles.php +++ b/app/Repositories/Shop/Articles.php @@ -222,7 +222,7 @@ class Articles { $saleChannelId = $options['sale_channel_id'] ?? SaleChannels::getDefaultID(); $model = self::getModelByOptions($options); - + return $model->withAvailableOffers($saleChannelId)->with([ 'image', 'product', @@ -308,7 +308,7 @@ class Articles public static function getFull($id) { $data['article'] = self::getArticleEdit($id); - + return self::getMeta($data); } diff --git a/app/Repositories/Shop/Deliveries.php b/app/Repositories/Shop/Deliveries.php index a9534e3c..250f680a 100644 --- a/app/Repositories/Shop/Deliveries.php +++ b/app/Repositories/Shop/Deliveries.php @@ -3,7 +3,6 @@ namespace App\Repositories\Shop; use App\Models\Shop\Delivery; -use App\Repositories\Shop\Customers; use App\Traits\Model\Basic; class Deliveries diff --git a/app/Repositories/Shop/Paybox.php b/app/Repositories/Shop/Paybox.php index 1eb4fdc2..39b3354c 100644 --- a/app/Repositories/Shop/Paybox.php +++ b/app/Repositories/Shop/Paybox.php @@ -2,12 +2,12 @@ namespace App\Repositories\Shop; -use Illuminate\Support\Facades\App; -use Illuminate\Support\Facades\Log; use Bnb\PayboxGateway\Requests\Paybox\AuthorizationWithCapture; use Bnb\PayboxGateway\Requests\PayboxDirect\Capture; -use Bnb\PayboxGateway\Responses\Paybox\Verify; use Bnb\PayboxGateway\Responses\Exceptions\InvalidSignature; +use Bnb\PayboxGateway\Responses\Paybox\Verify; +use Illuminate\Support\Facades\App; +use Illuminate\Support\Facades\Log; class Paybox {