'Paytabs Laravel Package doesn't send callback
My config/paytabs.php file
'region' => env('paytabs_region', 'SAU'),
'callback' => env('paytabs_ipn_callback', App\Http\Controllers\PaymentController::class ),
];
My App\Http\Controllers\PaymentController file
use Paytabscom\Laravel_paytabs\Facades\paypage;
class PaymentController extends Controller
{
public function payment()
{
$pay= paypage::sendPaymentCode('all')
->sendTransaction('sale')
->sendCart('product_id',1,'Product name')
->sendCustomerDetails('Name Surname', '[email protected]', '1111110011', 'test', 'City', 'Cairo', 'EG', '1234','100.279.20.10')
->sendHideShipping(true)
->sendURLs('https://testsite.com', 'https://testsite.com/paymentIPN')
->sendLanguage('en')
->create_pay_page();
return $pay;
}
public function updateCartByIPN( $requestData){
$data = $requestData->getTranRef();
}
}
I didn't change any route or function in package. I am not receiving any callback and it directly redicerts to sendURL. What is problem or if there is any error how can I see it.
Package : https://github.com/paytabscom/paytabs-php-laravel-package
I found a problem in Paytabscom\Laravel_paytabs\Controllers\PaytabsLaravelListenerApi.php
which is :
if(is_object($callback) && method_exists($callback, 'updateCartByIPN') ){
$callback->updateCartByIPN($ipnRequest);
}
Problem is about the is_object function. I do not still know why this function returns false when $callback have value of App\Http\Controllers\PaymentController.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
