Hi all...
I'm not really sure where to begin so I'll try to provide as many infos as possible...
And also: sorry for my english... it's not as good as I wish
We are running a pbx using asterisk (1.2.12) and asterisk2billing (1.2.3 BrainCoral from 08.13.2006).
Now I'll try to receive payments via PayPal.
The Payments done via PayPal are booked correctly on both accounts (sender and receiver) but not recognized by asterisk2billing so neither the cc_card nor the cc_paypal tables are updated.
In the PayPal-Logfile (/tmp/a2billing_paypal.log) on every payment i get the following entry (some data replace by "xxx"
):
--------
[Fri Oct 6 13:19:26 CEST 2006] paypay_ipn notification
Bad order (PayPal says it's invalid)HTTP/1.1 200 OK
Date: Fri, 06 Oct 2006 11:19:26 GMT
Server: Apache/1.3.33 (Unix) mod_gzip/1.3.26.1a mod_ssl/2.8.22 OpenSSL/0.9.7e
Set-Cookie: cookie_check=yes; expires=Mon, 03-Oct-2016 11:19:26 GMT; path=/; domain=.paypal.com
Set-Cookie: Apache=xxx.xxx.xxx.xxx.5181160133566480; path=/; expires=Sun, 28-Sep-36 11:19:26 GMT
Connection: close
Content-Type: text/html; charset=UTF-8
INVALID
The following data was received from PayPal:
------
That's all i receive, also via email to the sender of the payment.
I think that the configuration in the a2billing.conf is correct but I'll show it here - also with some data replaced by xxx):
---
; PAYPAL SETTINGS
[paypal]
Set the Paypal Email account.
[email protected]
; Set the from:address for the transaction notification
[email protected]
; Define the from:name for the transaction notification
from_name=xxxxx
; Set the company name to send for the transaction notification
company_name=xxxxxxxxx
; Set the email address for the notification and error report
[email protected]
; The Item name that is displayed to the customer when credit is purchased
item_name="Credit Purchase"
; Currency for the purchase, only one currency can be defined
currency_code=EUR
;IMPORTANT - Define here the URL to notify the payment back to the customer
;note that this is initiated by Paypal, and uses port 445 HTTPS, so this port must be open in the firewall.
notify_url=https://xxx.xxx.xxx/paypal/ipn_res.php
;Set the different amounts which are available - 5 amounts maximum (5:10:15)
purchase_amount=1:5:10:20:50
; paypal log file, to log the transactions & errors
paypal_logfile=/tmp/a2billing_paypal.log
----
Where "
[email protected]" is the correct email address for the receiving PayPal-Account and "
[email protected]" is the same address.
I was wondering about the port 445 for SSL but I think that's a typo and should be 443. However I tried both ports, on port 445 with ":445" after the domainname so it was something like "https://xxx.xxx.xxx:445/paypal/ipn_res.php".
The ipn_res.php is definitely reachable via both ways, so firewall is set correct.
Any ideas why it's not running?
Maybe of interest: for SSL I'm using a self-signed certificate at the moment and in the apache ssl-error-logfile I get something like "[warn] RSA server certificate CommonName (CN) `xxx.xxx' does NOT match server name!?" during apache startup.
Also in that logfile i get the following during a paypal transaction:
----
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined variable: popup_select in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 88
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined variable: popup_select in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 92
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined variable: popup_select in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 120
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined variable: popup_select in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 121
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined variable: popup_select in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 125
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined index: popup_select in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 129
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined index: popup_formname in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 129
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined index: popup_fieldname in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 129
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined variable: popup_select in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 132
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined variable: popup_select in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 151
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined variable: default_initbalance in /var/www/call24adm.leitfabrik.com/htdocs/Public/form_data/FG_var_card.inc on line 346
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Notice: Undefined variable: HTTP_POST_VARS in /var/www/call24adm.leitfabrik.com/htdocs/paypal/ipn_res.php on line 36
[Fri Oct 06 13:19:25 2006] [error] [client 216.113.188.202] PHP Warning: Invalid argument supplied for foreach() in /var/www/call24adm.leitfabrik.com/htdocs/paypal/ipn_res.php on line 39
[Fri Oct 06 13:19:26 2006] [error] [client 216.113.188.202] PHP Warning: Invalid argument supplied for foreach() in /var/www/call24adm.leitfabrik.com/htdocs/paypal/ipn_cls.php on line 31
---
Where 216.113.188.202 is an IP-Address from EBay.
Can't think of any more information to provide now.
Big thanks in advance for help!
Best regards