Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

We’re sorry. This seller doesn’t accept payments in your currency

I am trying to integrate paypal, but stuck with this error.

We’re sorry. This seller doesn’t accept payments in your currency. Please return to the seller and choose another way to pay.

The currency I am setting is USD. I have not blocked it and I have added it into my account.

enter image description here

enter image description here

Here is the code, I am using PHP.

 $transaction_value = $this->payment_detail['amount'];
    // $this->response($transaction_value);
    $apiContext = new \PayPal\Rest\ApiContext(new \PayPal\Auth\OAuthTokenCredential(PAYPAL_CLIENTID,PAYPAL_SECRET));
    $payer = new \PayPal\Api\Payer();
    $payer->setPaymentMethod('paypal');

    $amount = new \PayPal\Api\Amount();
    $amount->setTotal($transaction_value);
    $amount->setCurrency($this->payment_detail['currency']);
    // $amount->setCurrency('INR');

    $transaction = new \PayPal\Api\Transaction();
    $transaction->setAmount($amount);

    $redirectUrls = new \PayPal\Api\RedirectUrls();
    $redirectUrls->setReturnUrl(PROTOCOL.base_url().'pay/api/process')
        ->setCancelUrl(PROTOCOL.base_url().'home');

    $payment = new \PayPal\Api\Payment();
    $payment->setIntent('sale')
        ->setPayer($payer)
        ->setTransactions(array($transaction))
        ->setRedirectUrls($redirectUrls);
    try {
        $payment->create($apiContext);
        // $this->response(array("paymentId" => $payment->id));
        header('Location: '.$payment->getApprovalLink());
        exit(0);
        // echo $payment;

        // echo "\n\nRedirect user to approval_url: " . $payment->getApprovalLink() . "\n";
    }
    catch (\PayPal\Exception\PayPalConnectionException $ex) {
        // This will print the detailed information on the exception.
        //REALLY HELPFUL FOR DEBUGGING
        echo $ex->getData();
    }
like image 314
Satys Avatar asked May 20 '18 19:05

Satys


2 Answers

So I found a way to solve this problem.

Simply log in to the merchant account probably a sandbox account (Example: someone-facilitator@domain).

Then open settings page by clicking on the gear icon at the top right corner of your dashboard.

Now, From left sidebar click on "Selling Tools" and then on "update button" in front of "Block Payments" under the "Getting paid and managing my risk" Section.

Refer to the image attached.

Settings page - Screenshot

Now In the "Preferences for receiving payments" Section, choose "Yes, accept ...." for the question "Allow payments sent to me in a currency I do not hold:".

Preferences for receiving payments - Screenshot

That's it.

like image 180
Ankit Beniwal Avatar answered Nov 14 '22 23:11

Ankit Beniwal


I had the same problem. There's no need to worry about it. It's working totally fine. I called Paypal Customer support and they explained that for an Indian Paypal seller account to receive the money you need to set currency in USD and then only Non-Indian Accounts can make a purchase through it. If you set the currency as INR then only Indian accounts can make payment to you. You created a different account but still, you created it from India only using login credentials so it's still an Indian account. If you want to test then test from an account of someone who's not from India or not living in India. It will work properly fine.

Cheers!

like image 33
Mohammed mansoor Avatar answered Nov 14 '22 22:11

Mohammed mansoor