paypal


paypal error: 503 Service Temporarily Unavailable


One month ago we passed from paypal standard to paypal pro. The integration work fine until Sunday: occasionally paypal return me
Payment_status = Completed
Errore = 503<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Temporarily Unavailable</title>
</head><body>
<h1>Service Temporarily Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>
How can I find where is the problem?
The 503 response I was getting was "service unavailable" - not exactly the same as this one. The payment status was 'completed'
I phoned PayPal about it and they said it was a problem at their end which they were trying to resolve. They suggested I retry the call.
Here is what I did and it seems to be working.
//$req = set of key/value pairs sent by paypal
// Step 2: POST IPN data back to PayPal to validate
$ir = 0;
while($ir<3&&($ir==0||strpos($res,'Service Unavailable')>0)) {
if($ir!=0) { //wait and try again after 1st try
//log the problem somehow
$sam = 1;
sleep(2);
unset($res);
}
//setup the call
$ch = curl_init('https://www.paypal.com/cgi-bin/webscr');
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close'));
if( !($res = curl_exec($ch)) ) {
//log the problem somehow
curl_close($ch);
exit;
}
curl_close($ch);
$ir += 1;
}

Related Links

Bigcartel checkout not working
integrate Paypal payment to asp.net core with .net framework 4.6.1
Paypal permissions service
empty related_resources in response from credit card payment
How to test recurring payments on paypal?
'Note to seller' not available with PayPal button
Paypal direct debit
How can I get credit card CVV in PayPal test account?
Where are my PayPal API credentials (client_id, secret)
PayPal Express checkout - does not seem to run successfully
unable to integrate direct credit card payment on woocommerce with unsupported currency(Saudi Riyal)paypal
Paypal credit card payment with Paypal checkout HTML button
can not configure credit card to test funding failure with CCREJECT REFUSED
paypal adaptive in case of dispute
PayPal IPN: request to notify_url via GET?
Payments - Transfer between two parties

Categories

HOME
google-apps-script
visual-studio-2013
docker-swarm
zend-framework2
contact-form-7
slim-3
flexbox
cockroachdb
iso
lagom
phoenix
ssms-2016
dendrogram
derived
styles
deb
header-files
onesignal
continuous-deployment
hash-collision
dss
spreedly
web-audio-api
rhino
gettext
honeysql
passenger
precedence
lego
color-scheme
active-model-serializers
twiki
floating-accuracy
tripwire
knockout-3.0
stereo-3d
ttcn
3scale
archer
proof
jags
gist
azureportal
ticker
infinite-scroll
communication-protocol
festival
onresume
aescryptoserviceprovider
image-editing
emokit
usb-drive
android-cursoradapter
persistence.xml
futuretask
adobe-indesign
start-job
obfuscar
system.web
smartystreets
korma
httpcontext
anjuta
flash-cc
openkinect
chrome-for-android
shortcuts
adomd.net
pep8
awesomeprint
blockingqueue
static-variables
continuous-testing
subtract
isolatedstorage
selectonemenu
text-size
datacontract
chatroom
open-graph-beta
jquery-ui-button
handheld
weborb
data-execution-prevention

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App