Paypal's IPN Simulator using Laravel 5 -
i'm go mental problem, i'm implementing ipn system in app , started doing tests using paypal's ipn simulator.
when try send ipn simulation, gives following error:
we're sorry, there's http error. please try again.
first thought - paypal's service down - tested wrong since if create blank page , send ipn message http://mydns.com/blankpage.php
able send it.
second thought - problem routes - think it's not problem either:
here's ipn listener @ purchasecontroller.php
:
public function completed() { //fahim's paypal ipn listener $ipn = new paypalipnlistener(); $ipn->use_sandbox = true; $verified = $ipn->processipn(); $report = $ipn->gettextreport(); log::info("-----new payment-----"); log::info($report); if ($verified) { if($_post['address_status'] == 'confirmed'){ //sucess } } }
in routes.php
:
route::post('purchase/completed/', array('as' => 'purchase.completed', 'uses' => 'purchasecontroller@completed'));
is there known problems associated ipn simulator , laravel?
thank in advance.
looks found answer! problem tokenmismatchexception being thrown whenever paypal tried send post information.
for people same problem, here's solution:
add exception verifycsrftoken.php
middleware, exception uri won't need csrftoken verification:
in case, looks this:
protected $except = [ 'purchase/completed' ];
i'm working laravel 5, please keep in mind might different in lower versions.
Comments
Post a Comment