Baby steps php integration step by step help required


#1

Hi how are you?im kindly seeking help for testing paynow integration.im at this stage please assist on how to do the right thing

<?php //paynow require_once 'Paynow-PHP-SDK-master/autoloader.php'; $paynow = new Paynow\Payments\Paynow( ' 16166', 'd3715ba2-ef7f-48b4-950b-56304d0b54b9', 'http://example.com/gateways/paynow/update', // The return url can be set at later stages. You might want to do this if you want to pass data to the return url (like the reference of the transaction) 'http://localhost/index.php' ); $email="minniebucks4@gmail.com"; $txe=$_GET['txe']; $payment = $paynow->createPayment($txe,$email); // Passing in the name of the item and the price of the item $payment->add('Bananas', 2.50); $payment->add('Apples', 3.40); // Save the response from paynow in a variable $response = $paynow->send($payment); if($response->success()) { // Or if you prefer more control, get the link to redirect the user to, then use it as you see fit $link = $response->redirectUrl(); $pollUrl = $response->pollUrl(); // Check the status of the transaction $status = $paynow->pollTransaction($pollUrl); } ?>