Skip to content

Commit 6723388

Browse files
committed
Squashed commit of the following:
1 parent d6e9b49 commit 6723388

File tree

6 files changed

+13
-19
lines changed

6 files changed

+13
-19
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"require": {
1414
"php": "^8.0",
15-
"lunarphp/lunar": "^0.1",
15+
"lunarphp/lunar": "^0.2",
1616
"livewire/livewire": "^2.0"
1717
},
1818
"require-dev": {

routes/web.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
use Illuminate\Http\Request;
44

55
Route::get('opayo-threedsecure', function () {
6-
return view('lunar::opayo.threed-secure-iframe');
6+
return view('lunar::opayo.threed-secure-iframe');
77
})->name('opayo.threed.iframe');
88

99
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+
]);
1616
})->name('opayo.threed.response');

src/Components/PaymentForm.php

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
use Lunar\Facades\Payments;
88
use Lunar\Models\Cart;
99
use Lunar\Opayo\Facades\Opayo;
10-
use Lunar\Stripe\Facades\StripeFacade;
11-
use Stripe\PaymentIntent;
12-
use Stripe\Stripe;
1310

1411
class PaymentForm extends Component
1512
{

src/Opayo.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Lunar\Opayo;
44

5-
use GuzzleHttp\Exception\ClientException;
65
use Illuminate\Support\Facades\Http;
76

87
class Opayo implements OpayoInterface
@@ -17,9 +16,9 @@ class Opayo implements OpayoInterface
1716
public function __construct()
1817
{
1918
$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/'
2322
)->withHeaders([
2423
'Authorization' => 'Basic '.$this->getCredentials(),
2524
'Content-Type' => 'application/json',

src/OpayoPaymentType.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function authorize(): PaymentAuthorize
3636
{
3737
if (! $this->order) {
3838
if (! $this->order = $this->cart->order) {
39-
$this->order = $this->cart->getManager()->createOrder();
39+
$this->order = $this->cart->createOrder();
4040
}
4141
}
4242

@@ -195,7 +195,7 @@ public function threedsecure()
195195
{
196196
if (! $this->order) {
197197
if (! $this->order = $this->cart->order) {
198-
$this->order = $this->cart->getManager()->createOrder();
198+
$this->order = $this->cart->createOrder();
199199
}
200200
}
201201

src/OpayoServiceProvider.php

-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
namespace Lunar\Opayo;
44

55
use Illuminate\Support\Facades\Blade;
6-
use Illuminate\Support\Facades\File;
76
use Illuminate\Support\ServiceProvider;
87
use Livewire\Livewire;
98
use Lunar\Facades\Payments;
109
use Lunar\Opayo\Components\PaymentForm;
11-
use Lunar\Stripe\Managers\StripeManager;
1210

1311
class OpayoServiceProvider extends ServiceProvider
1412
{

0 commit comments

Comments
 (0)