Quantcast
Channel: Active questions tagged paypal - Stack Overflow
Viewing all articles
Browse latest Browse all 468

Using PayPal NVP, METHOD=DoDirectPayment, no code changes I started to get intermittent ACK=Failure

$
0
0

Using PayPal NVP, METHOD=DoDirectPayment, and starting the first week of August 2024, I am intermittently getting ACK=Failure in the responses. I assumed the problem was in my code but production has not changed for since March 2023.

Took the code out of my test. Tried some POSTs with curl and got similar results. Intermittent ACK=Failure.

PayPal support has been little (to no help). They keep telling me it is my code. I keep telling them I am not using code, I am using curl. Or they tell me to move to BrainTree or REST. Not helpful.

Wrote a bash script to make testing easier (and so I could post it here).

#!/bin/bashset -e# Check that all required variables are setrequired_vars=("PAYPAL_WPP_USER""PAYPAL_WPP_PASSWORD""PAYPAL_WPP_SIGNATURE""PAYPAL_WPP_CANCEL_URL""PAYPAL_WPP_RETURN_URL""PAYPAL_WPP_NOTIFY_URL")for var in "${required_vars[@]}"; do  if [ -z "${!var}" ]; then    echo "Error: $var is not set or is empty."    exit 1  fidonenvp_response=$(curl -s --insecure -X POST https://api-3t.sandbox.paypal.com/nvp \-d "USER=${PAYPAL_WPP_USER}" \-d "PWD=${PAYPAL_WPP_PASSWORD}" \-d "SIGNATURE=${PAYPAL_WPP_SIGNATURE}" \-d "VERSION=204.0" \-d "ACCT=4111111111111111" \-d "AMT=100.00" \-d "CITY=Thunder Bluff" \-d "COUNTRYCODE=US" \-d "CREDITCARDTYPE=Visa" \-d "CURRENCYCODE=USD" \-d "CUSTOM=100735" \-d "CVV2=123" \-d "EMAIL=tauren@gmail.com" \-d "EXPDATE=012032" \-d "FIRSTNAME=Ticky" \-d "INVNUM=20240831691803" \-d "IPADDRESS=8.8.8.8" \-d "ITEM_NAME=Armour" \-d "LASTNAME=Wicky" \-d "METHOD=DoDirectPayment" \-d "NOTIFYURL=${PAYPAL_WPP_NOTIFY_URL}" \-d "PAYMENTACTION=Sale" \-d "RETURNFMFDETAILS=1" \-d "STATE=CA" \-d "STREET=123 Mesa Road" \-d "ZIP=90210")echo "$nvp_response" | tr '&''\n' | sed 's/%2d/-/g; s/%3a/:/g; s/%20/ /g; s/%2e/./g'# Check for 'ACK=Failure' in the responseif echo "$nvp_response" | grep -q "ACK=Failure"; then  exit 1else  exit 0fi

Wrote another script to execute the above script 100 times, with random waits between executions and here is that result.

Number of successful executions (exit 0): 46Number of failed executions (exit 1): 54

Feels like a problem on PayPal's side but they keep informing me every things is working, my account is ok, etc.

Looking for any refactoring to the script to help prove the problem is on PayPal side (or show me what is wrong on my side).

Looking for any advise on how to troubleshoot this further.


Viewing all articles
Browse latest Browse all 468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>