paypal - Trouble getting the correct pay response from the PPMessage.php Core File when using PPMessage::init() function? -
i'm working in custom paypal adaptive payments gateway , i'm having problems getting right pay response (new payresponse) in php. have tracked error , found in core file ppmessage.php. payment gateway can create following paykey paypal adaptive payments:
$resp = array ( 'responseenvelope.timestamp' => '2016-02-05t06:57:57.098-08:00', 'responseenvelope.ack' => 'success', 'responseenvelope.correlationid' => 'e24f3c602852a', 'responseenvelope.build' => '17820627', 'paykey' => 'ap-62k58588w7248331v', 'paymentexecstatus' => 'created', );
when want translate pay response following:
$ret = new payresponse; $ret->init($resp);
payresponse extends ppmessage defines method init. however, core file ppmessage gives me following answer:
ret=payresponse::__set_state( array( 'responseenvelope' => null, 'paykey' => 'ap-62k58588w7248331v', 'paymentexecstatus' => 'created', 'payerrorlist' => null, 'paymentinfolist' => null, 'sender' => null, 'defaultfundingplan' => null, 'warningdatalist' => null, 'error' => null, ))
the problem responseenvelop key, since should array , i'm getting null. don't know how modify ppmessage::init method in order fix problem. can me? correct pay response should follows:
payresponse::__set_state(array( 'responseenvelope' => responseenvelope::__set_state(array( 'timestamp' => '2016-02-05t06:57:57.098-08:00', 'ack' => 'success', 'correlationid' => 'e24f3c602852a', 'build' => '17820627', )), 'paykey' => 'ap-62k58588w7248331v', 'paymentexecstatus' => 'created', 'payerrorlist' => null, 'defaultfundingplan' => null, 'error' => null, ))
note in correct response, responseenvelope object.
here link ppmessage file form github. knows paypal core files appreciated. check error general or if problem unique setup?
thanks.
after looking more setup, found out problem on paypal installation. i'm failing load responseenvelope class. there error, , class not loaded. i'm closing out question. thank reading this.
Comments
Post a Comment