File tree Expand file tree Collapse file tree 3 files changed +58
-3
lines changed Expand file tree Collapse file tree 3 files changed +58
-3
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ class Item extends Model implements Product
9898 return true;
9999 }
100100
101- public function getAmountProduct(): int
101+ public function getAmountProduct(Customer $customer ): int
102102 {
103103 return 100;
104104 }
@@ -107,8 +107,7 @@ class Item extends Model implements Product
107107 {
108108 return [
109109 'title' => $this->title,
110- 'description' => 'Purchase of Product #' . $this->id,
111- 'price' => $this->getAmountProduct(),
110+ 'description' => 'Purchase of Product #' . $this->id,
112111 ];
113112 }
114113
Original file line number Diff line number Diff line change @@ -63,3 +63,31 @@ class Item extends Model implements Product
6363## 3.0.x → 3.1.x
6464
6565Замените ` Taxing ` на ` Taxable ` .
66+
67+ ## 3.1.x → 4.0.x
68+
69+ > Если вы используете php 7.1, то версия 4.0 вам не доступна.
70+ > Вам необходимо обновить php.
71+
72+ Удалили поддержку старых версий ` laravel/cashier ` . Поддержка начинается от 7+.
73+
74+ #### Если используете оплаты
75+
76+ Вам необходимо добавить аргумент ` Customer $customer ` в метод ` getAmountProduct `
77+ вашей модели.
78+
79+ Ваш код на 3.x:
80+ ``` php
81+ public function getAmountProduct(): int
82+ {
83+ return $this->price;
84+ }
85+ ```
86+
87+ Ваш код на 4.x:
88+ ``` php
89+ public function getAmountProduct(Customer $customer): int
90+ {
91+ return $this->price;
92+ }
93+ ```
Original file line number Diff line number Diff line change @@ -63,3 +63,31 @@ class Item extends Model implements Product
6363## 3.0.x → 3.1.x
6464
6565Replace ` Taxing ` to ` Taxable ` .
66+
67+ ## 3.1.x → 4.0.x
68+
69+ > If you are using php 7.1, then version 4.0 is not available to you.
70+ > You need to update php.
71+
72+ Removed support for older versions of ` laravel/cashier ` . We support 7+.
73+
74+ #### If you use payment for goods
75+
76+ You must add the argument ` Customer $customer ` to the ` getAmountProduct `
77+ method of your model.
78+
79+ Your code on 3.x:
80+ ``` php
81+ public function getAmountProduct(): int
82+ {
83+ return $this->price;
84+ }
85+ ```
86+
87+ Your code on 4.x:
88+ ``` php
89+ public function getAmountProduct(Customer $customer): int
90+ {
91+ return $this->price;
92+ }
93+ ```
You can’t perform that action at this time.
0 commit comments