Call to undefined method Paynow\Core\InitResponse::redirectLink()


#1

I am getting the error : Call to undefined method Paynow\Core\InitResponse::redirectLink() when i try to call the redirectLink() function on the response object as per the doc ->

$payment = $paynow->createPayment(‘Invoice 35’, ‘user@example.com’);
$payment->add(‘Bananas’, 2.50);
$response = $paynow->send($payment);
$link = $response->redirectLink();

This is my dd for the $response object ->
{“success”:true,“status”:“ok”}

Kindly assist


#2

HI @privyreza. Thanks for getting in touch. If you would like to get the link, replace $link = $response->redirectLink(); with $link = $response->redirectUrl();

We’re currently in the process of updating the documentation so it can reflect that change. Sorry for any inconveniences caused.

Also, have a look at a similar post here.