PayPal adaptive payments error: incorrect credentials -
i'm implementing paypal payments in ios application. need transfer money customer merchant account i'm using old mpl sdk adaptive payments. works. need verify payment on server side. i'm using paymentdetails
api method (api reference). returns error:
authentication failed. api credentials incorrect.
i've created application on http://www.paypal-apps.com , requested api credentials in paypal profile. i've tried premier , business accounts. still no results.
when switch live sandbox , other way around should care config
of mode.
sadly did in php, not mpl sdk piece of code might right hint you:
live:
$apicontext = new \paypal\rest\apicontext( new \paypal\auth\oauthtokencredential('xxxxxxxxx...xxxxxxxxxx','yyyyyyy...yyyyyyyyy') ); $apicontext->setconfig( array('mode' => 'live') );
sandbox:
$apicontext = new \paypal\rest\apicontext( new \paypal\auth\oauthtokencredential('xxxxxxxxx...xxxxxxxxxx','yyyyyyyyyy...yyyyy') ); $apicontext->setconfig(array('mode' => 'sandbox'));
do not forget set mode according credentials (secret key). paypal not recognize type of secret-key own.
Comments
Post a Comment