mercredi 23 avril 2014

Payflow Error 52: Insufficient permissions to perform transaction in test mode


Vote count:

1




I am trying to configure payflow link application in test mode on codeigniter. I am doing this with Angell EYE PHP CodeIgniter Class Library for PayPal.


I have set up my developer sandbox account and added a user of Business-Pro type and a user of Personal type.


I have set up an account on manager.payflow.com and added a user with role 'API_FULL_TRANSACTIONS'.


Now here is my /application/config/paypal.php file:



<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config['Sandbox'] = TRUE;
$config['APIVersion'] = '98.0';
$config['APIUsername'] = $config['Sandbox'] ? '/*here goes Business user username from sandbox*/' : '';
$config['APIPassword'] = $config['Sandbox'] ? '/*here goes Business user password*/' : '';
$config['APISignature'] = $config['Sandbox'] ? '/*here goes Business user API signature*/' : '';

$config['PayFlowUsername'] = $config['Sandbox'] ? '/*here goes username of a user with API_FULL TRANSACTIONS role on manager.paypal.com*/' : '';
$config['PayFlowPassword'] = $config['Sandbox'] ? '/*here goes password of a user with API_FULL TRANSACTIONS role on manager.paypal.com*/' : '';
$config['PayFlowVendor'] = $config['Sandbox'] ? '/*here goes login to manager.paypal.com*/' : '';

$config['PayFlowPartner'] = $config['Sandbox'] ? 'PayPal' : '';
$config['ApplicationID'] = $config['Sandbox'] ? '' : 'PRODUCTION_APP_ID_GOES_HERE';
$config['DeveloperEmailAccount'] = '/*my email at developer.paypal.com*/';
$config['DeviceID'] = '';


Next I'm running the function in the /application/controllers/payflow.php controller:



function Process_transaction_demo()
{
$PayPalRequestData = array(
'tender'=>'P', //also tried this with 'C'
'trxtype'=>'S',
'acct'=>'/*here goes card number for Personal type sandbox acct*/',
'expdate'=>'0419', // as in sandbox Personal acct settings
'amt'=>'10.00',
'dutyamt'=>'',
'freightamt'=>'5.00',
'taxamt'=>'2.50',
'taxexempt'=>'',
'comment1'=>'This is a test!',
'comment2'=>'This is only a test!',
'cvv2'=>'123',
'recurring'=>'',
'swipe'=>'',
'orderid'=>'',
'billtoemail'=>'', // as in sandbox Personal acct settings
'billtophonenum'=>'816-555-5555',
'billtofirstname'=>'Tester',
'billtomiddlename'=>''
'billtolastname'=>'Testerson',
'billtostreet'=>'123 Test Ave.',
'billtocity'=>'Kansas City',
'billtostate'=>'MO',
'billtozip'=>'64111',
'billtocountry'=>'US',
'shiptofirstname'=>'Tester',
'shiptomiddlename'=>'',
'shiptolastname'=>'Testerson',
'shiptostreet'=>'123 Test Ave.',
'shiptocity'=>'Kansas City',
'shiptostate'=>'MO',
'shiptozip'=>'64111',
'shiptocountry'=>'US',
'origid'=>'',
'custref'=>'',
'custcode'=>'',
'custip'=>'',
'invnum'=>'',
'ponum'=>'',
'starttime'=>'',
'endtime'=>'',
'securetoken'=>'',
'partialauth'=>'',
'authcode'=>''
);

$PayPalResult = $this->paypal_payflow->ProcessTransaction($PayPalRequestData);

if(!$this->paypal_payflow->APICallSuccessful($PayPalResult['RESULT']))
{
// Error
echo '<pre />';
print_r($PayPalResult);
}
else
{
// Successful call. Load view or whatever you need to do here.
echo '<pre />';
print_r($PayPalResult);
}
}


And the respnse I get is:



Array
(
[RESULT] => 52
[PNREF] => A7P06B2A9D83
[RESPMSG] => Insufficient permissions to perform transaction
[RAWREQUEST] => /*request details*/
[RAWRESPONSE] => RESULT=52&PNREF=A7P06B2A9D83&RESPMSG=Insufficient permissions to perform transaction
)


Why does it keep returning this error? The permission for the user on manager.paypal.com is set to 'API_FULL_TRASACTIONS' (also tried with 'ADMIN', 'ADMIN_TRANSACTIONS', 'FULL_TRASACTIONS' - all give same response).


What should configuration be to process test payments?



asked 52 secs ago

VVV

30





Aucun commentaire:

Enregistrer un commentaire