File tree 6 files changed +13
-19
lines changed
6 files changed +13
-19
lines changed Original file line number Diff line number Diff line change 12
12
],
13
13
"require" : {
14
14
"php" : " ^8.0" ,
15
- "lunarphp/lunar" : " ^0.1 " ,
15
+ "lunarphp/lunar" : " ^0.2 " ,
16
16
"livewire/livewire" : " ^2.0"
17
17
},
18
18
"require-dev" : {
Original file line number Diff line number Diff line change 3
3
use Illuminate \Http \Request ;
4
4
5
5
Route::get ('opayo-threedsecure ' , function () {
6
- return view ('lunar::opayo.threed-secure-iframe ' );
6
+ return view ('lunar::opayo.threed-secure-iframe ' );
7
7
})->name ('opayo.threed.iframe ' );
8
8
9
9
Route::post ('opayo-threedsecure-response ' , function (Request $ request ) {
10
- return view ('lunar::opayo.threed-secure-response ' , [
11
- 'cres ' => $ request ->cres ,
12
- 'PaRes ' => $ request ->PaRes ,
13
- 'md ' => $ request ->md ,
14
- 'mdx ' => $ request ->mdx ,
15
- ]);
10
+ return view ('lunar::opayo.threed-secure-response ' , [
11
+ 'cres ' => $ request ->cres ,
12
+ 'PaRes ' => $ request ->PaRes ,
13
+ 'md ' => $ request ->md ,
14
+ 'mdx ' => $ request ->mdx ,
15
+ ]);
16
16
})->name ('opayo.threed.response ' );
Original file line number Diff line number Diff line change 7
7
use Lunar \Facades \Payments ;
8
8
use Lunar \Models \Cart ;
9
9
use Lunar \Opayo \Facades \Opayo ;
10
- use Lunar \Stripe \Facades \StripeFacade ;
11
- use Stripe \PaymentIntent ;
12
- use Stripe \Stripe ;
13
10
14
11
class PaymentForm extends Component
15
12
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace Lunar \Opayo ;
4
4
5
- use GuzzleHttp \Exception \ClientException ;
6
5
use Illuminate \Support \Facades \Http ;
7
6
8
7
class Opayo implements OpayoInterface
@@ -17,9 +16,9 @@ class Opayo implements OpayoInterface
17
16
public function __construct ()
18
17
{
19
18
$ this ->http = Http::baseUrl (
20
- config ('services.opayo.env ' , 'test ' ) == 'test ' ?
21
- 'https://pi-test.sagepay.com/api/v1/ ' :
22
- 'https://pi-live.sagepay.com/api/v1/ '
19
+ config ('services.opayo.env ' , 'test ' ) == 'test ' ?
20
+ 'https://pi-test.sagepay.com/api/v1/ ' :
21
+ 'https://pi-live.sagepay.com/api/v1/ '
23
22
)->withHeaders ([
24
23
'Authorization ' => 'Basic ' .$ this ->getCredentials (),
25
24
'Content-Type ' => 'application/json ' ,
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public function authorize(): PaymentAuthorize
36
36
{
37
37
if (! $ this ->order ) {
38
38
if (! $ this ->order = $ this ->cart ->order ) {
39
- $ this ->order = $ this ->cart ->getManager ()-> createOrder ();
39
+ $ this ->order = $ this ->cart ->createOrder ();
40
40
}
41
41
}
42
42
@@ -195,7 +195,7 @@ public function threedsecure()
195
195
{
196
196
if (! $ this ->order ) {
197
197
if (! $ this ->order = $ this ->cart ->order ) {
198
- $ this ->order = $ this ->cart ->getManager ()-> createOrder ();
198
+ $ this ->order = $ this ->cart ->createOrder ();
199
199
}
200
200
}
201
201
Original file line number Diff line number Diff line change 3
3
namespace Lunar \Opayo ;
4
4
5
5
use Illuminate \Support \Facades \Blade ;
6
- use Illuminate \Support \Facades \File ;
7
6
use Illuminate \Support \ServiceProvider ;
8
7
use Livewire \Livewire ;
9
8
use Lunar \Facades \Payments ;
10
9
use Lunar \Opayo \Components \PaymentForm ;
11
- use Lunar \Stripe \Managers \StripeManager ;
12
10
13
11
class OpayoServiceProvider extends ServiceProvider
14
12
{
You can’t perform that action at this time.
0 commit comments