I have some problem with notifyUrl. (Paysera/Omnipay) Im new in laravel so I'm wandering a lot at the moment. I want after payment activate my order, but cant get response... Here some code:
<?php
namespace App\Http\Controllers;
use Omnipay\Omnipay;
class PaymentController extends Controller
{
private $gateway;
public function __construct()
{
$this->gateway = Omnipay::create('Paysera');
$this->gateway->setProjectId('****');
$this->gateway->setPassword('****');
}
public function processPayment($orderId)
{
$response = $this->gateway->purchase(
[
'language' => 'ENG',
'transactionId' => $orderId,
'amount' => '10.00',
'currency' => 'EUR',
'returnUrl' => "http://localhost:8000/profile/payment/completed/{$orderId}",
'cancelUrl' => "http://localhost:8000/cancel",
'notifyUrl' => "http://localhost:8000/paysera/notify/{$orderId}",
]
)->send();
if ($response->isRedirect()) {
$response->redirect();
} else {
echo $response->getMessage();
}
}
public function notifyPayment($orderId)
{
$response = $this->gateway->acceptNotification();
dd($response);
}
}
i tried use acceptNotification(), but get this:
If im trying completePurchase()->send(), i get this:
Call to undefined method Omnipay\Paysera\Gateway::completePurchase()
How to get response after paying order?