File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 19
19
20
20
namespace Helldar \CashierDriver \Sber \Auth \Http ;
21
21
22
+ use Helldar \Cashier \Facades \Config \Main ;
22
23
use Helldar \Cashier \Http \Request as BaseRequest ;
23
24
use Helldar \Contracts \Cashier \Resources \Model ;
24
25
@@ -71,6 +72,20 @@ public function getRawBody(): array
71
72
];
72
73
}
73
74
75
+ public function getHttpOptions (): array
76
+ {
77
+ if (Main::isProduction ()) {
78
+ return [
79
+ 'cert ' => [
80
+ $ this ->model ->getCertificatePath (),
81
+ $ this ->model ->getCertificatePassword (),
82
+ ],
83
+ ];
84
+ }
85
+
86
+ return [];
87
+ }
88
+
74
89
protected function authorization (): string
75
90
{
76
91
return base64_encode ($ this ->model ->getClientId () . ': ' . $ this ->model ->getClientSecret ());
Original file line number Diff line number Diff line change 25
25
26
26
class ModelResource extends Model
27
27
{
28
+ public function getCertificatePath (): ?string
29
+ {
30
+ return null ;
31
+ }
32
+
33
+ public function getCertificatePassword (): ?string
34
+ {
35
+ return null ;
36
+ }
37
+
28
38
protected function clientId (): string
29
39
{
30
40
return config ('cashier.drivers.sber_qr.client_id ' );
You can’t perform that action at this time.
0 commit comments