Error creating paynow object in php


#1

<?php

require_once ‘./vendor/autoload.php’;

//MAKE AN API REQUEST

$paynow = new Paynow/Payments/Paynow(

    ‘INTEGRATION_ID’,

    ‘INTEGRATION_KEY’,

    ‘http://example.com/gateways/paynow/update’, // This is the result URL

    ‘http://example.com/return?gateway=paynow’ // This is the return URL

    );

when i paste this code after downloading php-sdk with comper its giving an eror “undefined Paynow” i dont know whats going on


#2

Hi there, you are a victim of / vs \ slash war!

Simply replace Paynow/Payments/Paynow with Paynow\Payments\Paynow and all should be well.


#3

Thanks man it worked hahaha


#4

ko how long does paynow take to finish testing my account cant finish making payment because its still under testing apo i got to launch project ASAP