php - Securepay is not working -


i have implemented secure pay payment gateway in website. working fine yesterday not working. did not response secure server. getting error.

a php error encountered

severity: notice

message: trying property of non-object

filename: libraries/securepay.php

line number: 479

in securepay.php 479 number line

($this->_translateservercode($this->responsetree->status->statuscode) == securepay_status_ok); 

and full function below

function testconnection() {     $this->requestxml = $this->_composeecho();     $this->responsexml = $this->_dispatch($this->requestxml);     $this->responsetree = simplexml_load_string($this->responsexml);     return ($this->_translateservercode($this->responsetree->status->statuscode) == securepay_status_ok); }  

below sample code:

include('securepay.php');

$sp = new securepay('abc0001','abc123', true); $sp->testmode();     $sp->testconnection();   $sp->cc = 4111111111111111; $sp->expirydate = '07/20'; $sp->chargeamount = 1500; $sp->chargecurrency = 'aud'; $sp->cvv = 321; $sp->orderid = 'ord34234';  if ($sp->valid()) {      $response = $sp->process();     if ($response == securepay_status_approved) {         echo "transaction success\n";     } else {         echo "transaction failed error code: $response\n";         echo "xml dump: " . print_r($sp->responsexml,1) . "\n";     } } else {     die("your data invalid\n"); }  

please me how solve it.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -