How to manually trigger Paypal error 10486 in sandbox? - paypal

Paypal says, use CCREJECT-REFUSED for address1 in credit card detail. https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/ht_ec_fundingfailure10486/
I tried creating new test user (CC credential was automatically created). Login into sandbox and add CC detail I got from first step. I change address line to CCREJECT-REFUSED. Save it. And then tested it, checking out via sandbox. Error 10486 was not triggered.
Any hint?

Mistake I made was to edit the SHIPPING address instead of the BILLING address.
Your best bet is to log directly into https://www.sandbox.paypal.com and hit the 'Profile' tab and try to add or edit a card there.
Watch out for the following :
Make sure you put exactly CCREJECT-REFUSED for BILLING address Line 1 with no spaces and TWO C at the beginning
They seem to be incompetent to keep the site running smoothly at all times so just try again
later if you get Service Temporarily Unavailable.
Make sure if you're adding a new card (you can use your own real card number) that you aren't getting a message telling you This card number is already assigned to another PayPal account. For security reasons, each card may only be assigned to one PayPal account because then you'll not be adding anything
Make sure payment method is actually set to credit card before you hit Submit for the order.
It does actually work though (as of today)

Okay, I was wrong to assume that the error can be triggered using direct CC payment.
As the document suggest:
You need to create a test user account
Login into sandbox using fore-mentioned account.
Change address part of test user CC to: CCREJECT-REFUSED
Then, in order to test it, run your express checkout flow as usual. But on the last part, do not use direct CC input. Instead, choose the other option -- login into your test user paypal account.
You will then received this kind of response:
TIMESTAMP=2013%2d08%2d19T06%3a50%3a45Z&CORRELATIONID=6761aff7944b&ACK=Failure&VERSION=104&BUILD=7319395&L_ERRORCODE0=10486&L_SHORTMESSAGE0=This%20transaction%20couldn%27t%20be%20completed%2e&L_LONGMESSAGE0=This%20transaction%20couldn%27t%20be%20completed%2e%20Please%20redirect%20your%20customer%20to%20PayPal%2e&L_SEVERITYCODE0=Error

All of these answers are now out of date. It's impossible to add a card with CCREJECT-REFUSED as the address and, if you could, it wouldn't do anything. You should follow the instructions at: https://developer.paypal.com/docs/classic/lifecycle/sb_error-conditions/
For the majority of APIs exposed by PayPal, this usually involves setting the order amount to the desired error code after enabling negative testing mode for your sandbox business account.
For example, triggering a 10486 via the Express Checkout NVP API would involve setting the AMT to $104.86.

As taking directly from their tutorial: (see step 2)
Login to https://www.sandbox.paypal.com using your buyer's test PayPal account.
Replace the contents of the street address Line-1 of the buyer's test credit card, with CCREJECT-REFUSED.
Execute a typical Express Checkout payment flow against the Sandbox test environment using the same buyer account and with the same credit card that you just modified.
When you execute DoExpressCheckoutPayment, error code 10486 will be returned. Your code should redirect the buyer back to PayPal using the same redirect URL used to start the checkout flow and the same Express Checkout token.

Related

Invalid or unsupported currency code paypal error when using multiple currency

I am using payflow pro. When I use currency code 'USD' all payment flow's works fine. But when I change currency code to 'CAD' it will return error with result code 06 which means Invalid or unsupported currency code. How to solve this problem?
This is not problem with your code.
Following https://developer.paypal.com/docs/classic/api/currency_codes/
Payment Receiving Preferences
If you have a PayPal Premier or Business account, configure your Payment
Receiving Preferences to handle payments automatically. You can convert
any payment into your primary currency or block certain types of payments.
You can set the following:
Block or unblock payments from U.S. customers who don’t have a confirmed address.
Block or unblock payments sent to you in a currency you don’t hold.
Block or unblock payments for duplicate invoice IDs.
Block or unblock payments from customers who have non-U.S. PayPal accounts.
Block or unblock payments from Student Account holders.
Log in to your PayPal business account at www.paypal.com. Click the
profile icon (Profile menu) on the top right side of the page. From the
Business Profile menu, select Profile and Settings.
Note: If you do not see the profile icon on the top right, select
Profile which appears in the top menu when the My Account tab is selected.
From the left menu, click My selling tools.
In the Getting paid and managing my risk section, click the Update link
for the Block Payments item.
Update your settings and click Save.
Just happened to hit this problem with Magento 2.3.1, when paying with credit card against PayPal Payflow Pro. Our default currency for the store is "CAD".
The support team is super, after our several failed transactions they managed to figure our the problem, let me share their reply here:
Thanks for reaching out today. Happy to help.
It looks as though this is an issue with the currency code you're passing. Right now it appears you're trying to pass USD in on the $0.00 verification call, but CAD on the actual 2.20 transaction itself. When you verify a card, the transaction you attempt against that verification must use the same currency. Try passing the subsequent transaction with USD, or create the verification in CAD and then run the transaction against it using CAD. See https://developer.paypal.com/docs/classic/payflow/integration-guide/#submitting-account-verifications for more on verifications. That's a great resource for Payflow in general as well.
That should resolve the issue you're seeing, but please let us know if you run into any other issues.
I hope that helps. Let us know if you have any questions.
That says for two API calls from our server (Magento 2.3.1) to PayPal need to specify the same currency code. While our first API call which sending amt=0 field doesn't have separate currency field there, so I guess the default value was assigned which is "USD". While the second API call which sending the real amt number had currency=CAD field, that might confused the API and eventually refused by it.
For Magento 2.3.1 the fix is to add the currency filed for the first API call, which the same idea may apply to other conditions as well.
Here is the Magento fix in case you are interested.

Paypal keeps on asking to create new account when paying using credit card

Is this the real behavior of Paypal. I am using the Paypal REST api (payment api's), and it is working fine and customers can use it. The only problem is when a new customer (one that has not visited paypal.com once) tries to buy our product, paypal seems to require him to create an account.
Here's the procedure:
First time to visit paypal.com (meaning no cookies / not cached or anything).
Customer Buy Product (Our website creates the payment transaction then redirects him to paypal.com)
Customer click Pay with my credit or debit card (He does not want to create a paypal account).
The country set is Philippines (I think paypal detects this so it is initially set to where I am) and I can proceed paying with my credit card
I tried changing the country to somewhere else
Here's comes the problem, on some countries, I am shown a different form, a form for creating a new account in Paypal.
Hope you understand what I am saying. Thanks.
It’s important to remember that guest checkout is not guaranteed for every transaction. PayPal runs a risk check to determine eligibility for guest checkout. There will be times when guest checkout is not available. This is intended. Here are a few things to make sure guest checkout is offered as often as possible.
-Verified PayPal account
-Confirmed email address
-Guest Checkout enabled - To see this, log in, go to Profile and click 'My selling preferences', click on Update next to Website preferences - scroll down the screen and find "PayPal Account Optional" section - you can enable/disable PayPal Account optional here.
-With Express Checkout their cart must pass “SOLUTIONTYPE=Sole”
Unfortunately, there are few parameters which are still incompatible with REST API including SOLUTIONTYPE which works only in Classic API.
If all of these are met and it’s not available then our system has decided to disable the guest checkout option for risk reasons. This is not a permanent decision and it will be available in the future.

paypal sandbox merchant account error

I have a website that I'm trying to hook paypal up to with a php script. php builds the query string and then submits to https://www.paypal.com/cgi-bin/webscr with the query string attached. I can verify that this works fine. I haven't processed a payment but it directs to PayPal with the correct quantities and prices, etc.
However when I change to https://www.sandbox.paypal.com/cgi-bin/webscr I get an error when I try to process that says there was a problem with the merchants PayPal account.
I have created several test accounts on PayPal sandbox but from what I can tell looking around it seems I need another merchant account in the sandbox? If so, I don't see how to do this. I'm guessing I need to change the "?business=mycode" portion of the query string but I don't know how to figure out what to change it to...
Anyway I looked around a while and can't find the answer, can anyone help or direct me to another post that answers this (I looked but couldn't find it, or at least didn't understand it if I did)?
When changing back from live to sandbox, all you should need to change if using a non hosted button is the URL to reflect the environment that you are trying to test with and the value of the business variable. This can be set to either your email address of the actual test or live seller account or the merchant id. If you have not already created an account for testing. You can do so by going to PayPal's Developer Site, and creating a developer account. Then once you have done this, you can log into the developer account and go to the Applications tab. Once on this page, click the link for sandbox accounts on the left, and create a preconfigured test seller account. This will generate an email address linked to a test account. This will be the email address that you will need to use. If this doesn't work, can you provide the string that you are submitting over to PayPal or the button code that you are using and I will take a look at it.
There is error in API key for sandbox testing in Paypal... It is due to corrupt key generation which is not properly decoded on sandbox server when you send a purchase request.
I tried using following sandbox public credentials and it works fine for me
username: sdk-three_api1.sdk.com
password: QFZCWN5HZM8VBG7Q
key: A-IzJhZZjhg29XQ2qnhapuwxIDzyAZQ92FRP5dqBzVesOkzbdUONzmOU
however I tried several times using the sandbox merchant account that i have created myself.... but was unable to ACK success.

How to test buyer side of a Credit Card transaction on PayPal Website Payments Pro?

We are running an e-commerce web site on Ruby on Rails and for the processing of Credit Cards we use the ActiveMerchant plugin to interface to our PayPal Website Payments Pro account using our API credentials.
As part of the checkout process we first call the authorize function on our gateway object and then, after some further checks, we perform the capture part.
We have lately been experiencing a bug where an amount gets reserved twice on a customer's account: one charge being only the authorization and the second being the final purchase. So to the client it looks like we are billing him twice (once for authorization, once for final purchase) while we are actually receiving the money only once and the "second charge" on his account is simply an authorization that we don't clear for some reason. (This seems to happen particularly when PayPal FMF rejects our transaction and we re-process.)
I am trying to troubleshoot this by creating PayPal Sandbox Accounts for Buyer and for Seller. I am running through the code line by line via Rails Console and simulating different conditions to try and replicate the error. However, my successful Credit Card transactions only appear in my "seller"/"merchant" account and not in the "buyer" account on the PayPal Sandbox so I cannot see what the effect of my code sequence is having on a customer's card. This post seems to indicate that that is just the way things are and that it is indeed not possible to test the effect on Buyer Credit Card side. This post suggests using PayPal Express Checkout but that is not what we need on our site as we're specifically looking at Credit Card transactions here that are integrated to our site.
How can I test the effect of my code on a client's Credit Card? Is there perhaps something I missed in PayPal or is there maybe some mode/log/monitor in ActiveMerchant that I can use to see this? I need to find the line of code that is causing us to authorize twice.
If the initial transaction is being rejected by FMF, and then you reattempt another transaction this would cause a second hold on the buyers card as this would be a completely different transaction attempt. The bank may have approved the first transaction, but then the FMF filters declined it based on your settings. As far as the bank is concerned, it is still a valid charge that was approved. So when you run your second attempt, this will cause a second hold on the card for the same amount but for a different transaction.

Check if paypal email address is a verified user

I would like to check if a paypal user who tries to buy something from my site has a verified account before he makes purchase.
Once the user isn't verified, any payment he/she makes would fail. Funds will be returned back to user automatically.
Is there any code I can add or edit to make this work due to fraud issues.
Well I found this
https://www.paypal.com/us/verified/pal=emailhere
where if i replace emailhere with any email i get verified or unverified.
I would like to add this to the code.
Thanks
If you're not already, I would recommend using the Express Checkout API. This will allow you to check the payer status prior to finalizing the payment.
The SetExpressCheckout API would generate your token that you use to redirect the user to PayPal with. They would then sign in, review the order, and click continue which would send them back to your site.
At that point, you can call GetExpressCheckoutDetails to obtain all the buyer details including their verified status.
To finalize the whole thing you would call DoExpressCheckoutPayment. In cases where the payer is not verified, though, you could simply stop the flow and leave this call out. No payment will have taken place so no refund would be necessary. You can simply display a message that they need to verify their account prior to making purchases from you.
If you happen to be working with PHP I would recommend taking a look at my class library for PayPal. It makes all of this very simple for you.