Rizwan Khan
Rizwan Khan

Reputation: 209

Paypal Refund NVP API : You do not have permission to refund this transaction

i Am using Paypal NVP Refund Api For Refund Paypal Transaction. All Things are ok but when i try to rung api, it gives me below Response.

Array
(
    [TIMESTAMP] => 2017-07-17T13:58:24Z
    [CORRELATIONID] => xxxxxxxxxx
    [ACK] => Failure
    [VERSION] => 51.0
    [BUILD] => 36458220
    [L_ERRORCODE0] => 10007
    [L_SHORTMESSAGE0] => Permission denied
    [L_LONGMESSAGE0] => You do not have permission to refund this transaction
    [L_SEVERITYCODE0] => Error
)

is that some process i miss to call.?

Upvotes: 2

Views: 1729

Answers (2)

Rizwan Khan
Rizwan Khan

Reputation: 209

After giving permission same issue exists. Then I found I missed an argument..

I'm sending this request.

$nvpreq = array(
    'USER' => '',
    'PWD' => '',
    'SIGNATURE' => '',
    'METHOD'=> 'RefundTransaction',
    'VERSION' => urlencode('94'),
    'TRANSACTIONID' => 'xxxxxxxx',
    'REFUNDTYPE' => 'Partial',
    'AMT' => '0.01',
    'CURRENCYCODE' => 'USD');

I forgot to add 'SUBJECT' => '[email protected]',. Now it is working.

Upvotes: 1

Hamza Zafeer
Hamza Zafeer

Reputation: 2436

Here is the some causes of this error.

  1. You used the wrong transaction ID.

  2. You're trying to make the call for a third party and have the wrong email address in the subject.

  3. The subject account hasn't given you permission to make the third-party call.

Here is link you can check this. Why did I get API error code 10007?

Upvotes: 0

Related Questions