Jugal Kishor
Jugal Kishor

Reputation: 29

Paypal adaptive method in php and codeigniter

I am using Codeigniter and implementing the paypal delayed chained adaptive method. I have completed first leg successfully. The payment is going to primary receiver, but when I use the Execute Payment by passing the PayKey, this is giving me following error result:

Array (
        [Receiver] => 
        [Category] => Application
        [Domain] => PLATFORM
        [ErrorID] => 550001
        [ExceptionID] => 
        [Message] => This payment request must be authorized by the sender
        [Parameter] => 
        [Severity] => Error
        [Subdomain] => Application
    )

Upvotes: 2

Views: 797

Answers (1)

Patrick Savalle
Patrick Savalle

Reputation: 4426

I am guessing you use the IPN method?

I ran into problems also using the IPN mechanism from the adaptive payments. There is an error in the sample code from Paypal. Somewhere in your flow you need to return the exact same request to Paypal. Their example code is like this:

$req = 'cmd=_notify-validate&'
if (isset($_POST))
{
    foreach ($_POST as $key=>$value)
    {
        $req .= "&".$key."=".urlencode(stripslashes($value));
    }
} 

This won't work, since there are brackets in the request which PHP interprets into arrays. You need to do:

$req = 'cmd=_notify-validate&'.file_get_contents("php://input"); 

Please take a look at this forum topic I posted on the CI forum:

http://codeigniter.com/forums/viewthread/195377/

Also, I want to make you aware of the new payment spark for CI:

http://getsparks.org/packages/codeigniter-payments/versions/HEAD/show

This should make your work a lot easier!

Upvotes: 1

Related Questions