我使用Paypal和Django。两个月前Paypal IPN工作正常,但现在它失败了。而Paypal IPN模拟器给了我这个错误:
We're sorry, we could not send an IPN.
我在Apache WSGI上使用django。在这里你有我的服务器配置:
<VirtualHost *:80>
ServerAdmin marcos@domain.com
ServerName domain.com
ServerAlias www.domain.com
WSGIScriptAlias / /var/www/domain/domain.wsgi
Alias /static/ /var/www/domain/static/
Alias /media/ /var/www/domain/media/
<Location "/static/">
Options -Indexes
</Location>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
在this one之类的其他问题中,他们说问题是使用非标准端口,但我使用端口&#34; 80&#34;。
我用来发送paypal的表单是:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="paypal@domain.com">
<input type="hidden" name="undefined_quantity" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="item_name" value="Title">
<input type="hidden" name="item_number" value="gD9s3nj4eW">
<input type="hidden" name="amount" value="26.90">
<input type="hidden" name="return" value="http://domain.com/thanks/">
<input type="hidden" name="cancel_return" value="http://domain.com/canceled/">
<input type="hidden" name="notify_url" value="http://domain.com/paypal_response">
<button type="submit" name="submit" id="confirmar-compra">Confirmar</button>
</form>