Mobile payment php


#1

im getting this error wher im i getting it wrong please help
im using php sdk with slim and composer

$payment = $paynow->createPayment(‘REF’, ‘myemail@gmail.com’);
$payment->add(‘Bananas’, 2.50);
$payment->add(‘Apples’, 3.40);

$response = $paynow->sendMobile($payment, ‘0772222222’, ‘ecocash’);

C:\wamp64\www\\routes\api.php:82:
object(Paynow\Core\InitResponse)[58]
  private 'data' => 
    array (size=2)
      'status' => string 'Error' (length=5)
      'error' => string 'Invalid Hash.  Hash should start with: DD4007' (length=45)
  public 'success' => boolean false
  public 'status' => string 'error' (length=5)
  private 'errors' => 
    array (size=1)
      0 => string 'invalid hash.  hash should start with: dd4007' (length=45)

#2

Please check your inbox. We’ve PM’ed you.


#3

I’m getting the same error message, whilst integrating with PHP:

Processingobject(Paynow\Core\InitResponse)#6 (4) { [“data”:“Paynow\Core\InitResponse”:private]=> array(2) { [“status”]=> string(5) “Error” [“error”]=> string(45) “Invalid Hash. Hash should start with: 10544D” } [“success”]=> bool(false) [“status”]=> string(5) “error” [“errors”:“Paynow\Core\InitResponse”:private]=> array(1) { [0]=> string(45) “invalid hash. hash should start with: 10544d” } }


#4

I’m facing exactly the same error. What can I do to resolve it


#5

Hi Andrew. Thanks for bringing that bug to our attention. It’s been fixed in this PR and will be getting released to Packagist


#6

An update has been released onPackagist (v.1.0.5). Please run composer update to get the updated library which fixes that issue :slight_smile:


#7

Notice : Undefined property: Paynow\Core\InitResponse::$error in C:\xampp1\htdocs\Paynow-PHP-SDK-master\examples\mobile.php on line 36
i am facing this issue using sdk how do i resolve it