URGENT:problem with Paypal

Author Message

christian bencivenni

Tuesday 08 January 2008 4:52:07 am

Hi.
i have a very urgent problem.
I set up a development e-commerce site with credit card payment based on paypal.
All work correctly exept for the return from Paypal sandbox.
I receive this message:
"Waiting for a response from the payment server. This can take some
time."
And after 3 refreshes it then displays
"We did not get a confirmation from the payment server"

I read other topics and documentation.

my eZPaypal_notify_url.log say:
08-01-2008 13-23 notify_url.php was propertly ended

my eZPaypalChecker.log say:
08-01-2008 13-23 createDataFromPOST
08-01-2008 13-23 payment_date = 04:21:44 Jan 08, 2008 PST
08-01-2008 13-23 txn_type = web_accept
08-01-2008 13-23 last_name = Bondi
08-01-2008 13-23 residence_country = US
08-01-2008 13-23 pending_reason = echeck
08-01-2008 13-23 item_name = Merlot
08-01-2008 13-23 payment_gross =
08-01-2008 13-23 mc_currency = EUR
08-01-2008 13-23 business = [email protected]
08-01-2008 13-23 payment_type = echeck
08-01-2008 13-23 verify_sign = A-UhjZTDwYWJ0.epgvA8EEphvtUvAFTKXisrfFGF4M61JjHuLsvhRHqv
08-01-2008 13-23 payer_status = verified
08-01-2008 13-23 test_ipn = 1
08-01-2008 13-23 tax = 0.00
08-01-2008 13-23 payer_email = [email protected]
08-01-2008 13-23 txn_id = 2TA77257LJ9501542
08-01-2008 13-23 quantity = 1
08-01-2008 13-23 receiver_email = [email protected]
08-01-2008 13-23 first_name = Alessandro
08-01-2008 13-23 payer_id = UYTRMTG3PWTM4
08-01-2008 13-23 receiver_id = 7LLVU6LUWF4T6
08-01-2008 13-23 item_number =
08-01-2008 13-23 payer_business_name = Alessandro Bondi's Test Store
08-01-2008 13-23 payment_status = Pending
08-01-2008 13-23 shipping = 0.00
08-01-2008 13-23 mc_gross = 36.00
08-01-2008 13-23 custom = 48
08-01-2008 13-23 charset = windows-1252
08-01-2008 13-23 notify_version = 2.4
08-01-2008 13-23 requestValidation. response from server is: VERIFIED
08-01-2008 13-23 check Field ----
08-01-2008 13-23 ERROR - receiving value doesn't match!!!
08-01-2008 13-23 Field :payment_status
08-01-2008 13-23 Value :Pending
08-01-2008 13-23 Expected value :Completed
08-01-2008 13-23 ----
08-01-2008 13-23 checkPaymentStatus faild

the seller and buyer sandbox account are all verified.

please someone can help me?
It is very urgent.
Thank you in advance

christian bencivenni

Thursday 10 January 2008 12:54:04 am

Anyone knowns a solution to my prblem?

André R.

Thursday 10 January 2008 2:38:32 am

Apart from triple posting your question: no.
Form the other post it looked like it was a response problem from the servers ( different response then the paypal extension expects). I have never used the paypal extension for anything other then using it as a reference when creating another payment solution (payex).
But you should look into debugging the response you get / looking at the spec from your provider / contacting you provider to get them to debug on their side.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

christian bencivenni

Sunday 13 January 2008 11:23:51 pm

I'm sorry for the three thread but it was very urgent and right now you are the only one who tried an answer.
My problem is: all I can debug is atteched above. I don't know who I can call to resolve the problem.
I hoped that with a so-old extension like ezPaypal others know a way to resolve it but it seems is it not like I think.
Ii can e a Site-server problem? Or a Paypal-server one? Or an eZ misunderstood in script function?
I don't really know. This is my first (and probably last) try with ez and credit card payment.

Now I'm readin the 60 pages Paypal documentation. I hope to find something in the reply variables.

christian bencivenni

Wednesday 16 January 2008 1:02:35 am

A new append.
I'm tring with different solution.

1) Try change the "VERIFIED" value in Line 66 of the file called "ezpaypalchecker.php" so:

if( $response && strcasecmp( $response, 'VERIFIED' ) == 0 )  {     return true;  } 

become:

if( $response && strcasecmp( $response, 'Completed' ) == 0 )  {     return true;  } 

but it doesn't work yet.

2)I also try with:

if( $response && strcmp( $response, 'VERIFIED' ) == 0 )  {     return true;  } 

hoping that a less hard detect can work but, again, without success.

I will try again.

André R.

Wednesday 16 January 2008 1:11:04 am

-- EDIT: removed since it was invalid --

From you debug output, you can see that the response is verified, but not completed:

08-01-2008 13-23 requestValidation. response from server is: VERIFIED
08-01-2008 13-23 check Field ----
08-01-2008 13-23 ERROR - receiving value doesn't match!!!
08-01-2008 13-23 Field :payment_status
08-01-2008 13-23 Value :Pending
08-01-2008 13-23 Expected value :Completed
08-01-2008 13-23 ----
08-01-2008 13-23 checkPaymentStatus faild

So it's the 'checkPaymentStatus()', and 'checkDataField()' part you need to look into.

'checkDataField()' is in the base class 'eZPaymentCallbackChecker':
kernel/shop/classes/ezpaymentcallbackchecker.php

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Elena Ivanova

Friday 18 January 2008 4:57:26 am

Hi Christian,

I have the same problem as you with the same error line in the log: ERROR - receiving value doesn't match!!!

Did you get the way to solve it? Or someone else?

Thanks,
Elena

christian bencivenni

Sunday 20 January 2008 10:19:50 pm

Hi Elena.
Not working 'till now.
I'm doing some tires and I found that after the first try, ez goes into a "Pending state" and every thing I'll do after this all remain unchanged.
The example in the first post which Andrè talked about is after many tries.
Now I will try again but firt I must clean the basket after the checkout button is push or I cannot exit from the "Pending state".

Elena Ivanova

Monday 21 January 2008 6:31:57 am

Hi Christian,

Thanks for your answer.

Looking at my eZPaypalChecker.log:

21-01-2008 14-21 check Field ----
21-01-2008 14-21 ERROR - receiving value doesn't match!!!
21-01-2008 14-21 Field :<b>payment_status</b>
21-01-2008 14-21 Value :<b>Pending</b>
21-01-2008 14-21 Expected value :<b>Completed</b>

made me try hacking ezpaypalchecker.php. It is located in 'extension\ezpaypal\classes'. Line 80:

if( $this->checkDataField( 'payment_status', 'Completed' ) )

I changed to

if( $this->checkDataField( 'payment_status', 'Pending' ) )

After this change I was successfuly redirected to order view page. Looking at my test customer paypal email, there is a message for payment confirmation. There is not message for such payment in the seller test email box, though.

I am not sure if this is the right way for our problem, but it seems to work.

What do you think?

christian bencivenni

Monday 21 January 2008 10:13:27 pm

I think that by this way you force ez to accept the payment as completed, but it isn't completed yet.
A question: after your change you can see the order in the your shop section of back end?
What is its status?

Elena Ivanova

Tuesday 22 January 2008 7:21:11 am

I have to admit you're right. The status in admin is pending ... so the problem is still open :-(.

Elena Ivanova

Tuesday 22 January 2008 9:46:20 am

Hi,

I returned ezpaypalchecker.php as it was, i.e. on line 80

if( $this->checkDataField( 'payment_status', 'Completed' ) )

After that, following the instructions for testing at: http://ezpedia.org/wiki/en/ez/ez_paypal, I enabled IPN in my business testing account at Sandbox and in cms I finished the payment successfuly (no server respond problem). So, I think, enabling this Instant Payment Notification is one of the crucial prerequisites.

christian bencivenni

Wednesday 23 January 2008 8:18:08 am

can you post your steps in ipn configuration?
I configured it too but the order never appear in my back end.

Elena Ivanova

Wednesday 23 January 2008 8:58:18 am

Hi,

To configure IPN you should enter the sandbox business account.

After that follow the menu Profile.

Then under Selling preferences column (the third column) there is a link for Instant Payment Notification.

When edit, the notify_url should be defined. In my case it is: http://myserver.com/extension/ezpaypal/modules/paypal/notify_url.php

Hope it helps.

christian bencivenni

Friday 25 January 2008 11:59:18 am

And how you resolve this point:
PageStyle - The style to be used on the PayPal pages. Make sure this is either commented out or has a value. If left blank it will generate errors on the PayPal pages.
of the wiki?

How you changed the paypal.ini and where you changed it?

christian bencivenni

Friday 25 January 2008 12:12:04 pm

I tried again this evening.
The payment is done correctly from the Paypal side.
I receive confirm of the payment and compare the "<i>wait 5 seconds to return to the e.commerce site</i>" page so I think there are not problem in Paypal.

Then again the:
"Waiting for a response from the payment server. This can take some
time."
And after 3 refreshes it then displays
"We did not get a confirmation from the payment server"

I searched the logs and I find:

error.log:

...
[ Jan 25 2008 20:48:54 ] [81.208.83.217] eZINI:
Undefined variable: 'PageStyle' in group 'PaypalSettings' in paypal.ini
[ Jan 25 2008 20:50:09 ] [66.135.197.164] eZSys::serverVariable:
Server variable 'REQUEST_URI' does not exist
[ Jan 25 2008 20:50:09 ] [66.135.197.164] eZSys::serverVariable:
Server variable 'SCRIPT_FILENAME' does not exist
[ Jan 25 2008 20:50:09 ] [66.135.197.164] eZSys::serverVariable:
Server variable 'DOCUMENT_ROOT' does not exist
[ Jan 25 2008 20:50:16 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'REQUEST_URI' does not exist
[ Jan 25 2008 20:50:16 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'SCRIPT_FILENAME' does not exist
[ Jan 25 2008 20:50:16 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'DOCUMENT_ROOT' does not exist
[ Jan 25 2008 20:50:44 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'REQUEST_URI' does not exist
[ Jan 25 2008 20:50:44 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'SCRIPT_FILENAME' does not exist
[ Jan 25 2008 20:50:44 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'DOCUMENT_ROOT' does not exist
[ Jan 25 2008 20:51:12 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'REQUEST_URI' does not exist
[ Jan 25 2008 20:51:12 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'SCRIPT_FILENAME' does not exist
[ Jan 25 2008 20:51:12 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'DOCUMENT_ROOT' does not exist
[ Jan 25 2008 20:51:37 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'REQUEST_URI' does not exist
[ Jan 25 2008 20:51:37 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'SCRIPT_FILENAME' does not exist
[ Jan 25 2008 20:51:37 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'DOCUMENT_ROOT' does not exist
[ Jan 25 2008 20:51:41 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'REQUEST_URI' does not exist
[ Jan 25 2008 20:51:41 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'SCRIPT_FILENAME' does not exist
[ Jan 25 2008 20:51:41 ] [81.208.83.217] eZSys::serverVariable:
Server variable 'DOCUMENT_ROOT' does not exist

I don't know what it means but I have tens of these rows in the log. probably it depends on the number of tries eZ do.

eZPaypal_notify_url.log:

25-01-2008 20-50  notify_url.php was propertly ended

eZPaypalChecker.log:

25-01-2008 20-50  createDataFromPOST
25-01-2008 20-50  payment_date = 11:49:47 Jan 25, 2008 PST
25-01-2008 20-50  txn_type = web_accept
25-01-2008 20-50  last_name = Bondi
25-01-2008 20-50  residence_country = US
25-01-2008 20-50  pending_reason = echeck
25-01-2008 20-50  item_name = Merlot
25-01-2008 20-50  payment_gross = 
25-01-2008 20-50  mc_currency = EUR
25-01-2008 20-50  business = [email protected]
25-01-2008 20-50  payment_type = echeck
25-01-2008 20-50  verify_sign = ACExJ-NWQIIkxlrs5YruzYs16juDAteBsxAI85AE1tcX9HRSqIHMX2Zo
25-01-2008 20-50  payer_status = verified
25-01-2008 20-50  test_ipn = 1
25-01-2008 20-50  tax = 0.00
25-01-2008 20-50  payer_email = [email protected]
25-01-2008 20-50  txn_id = 02A784567A983225C
25-01-2008 20-50  quantity = 1
25-01-2008 20-50  receiver_email = [email protected]
25-01-2008 20-50  first_name = Alessandro
25-01-2008 20-50  payer_id = UYTRMTG3PWTM4
25-01-2008 20-50  receiver_id = 7LLVU6LUWF4T6
25-01-2008 20-50  item_number = 
25-01-2008 20-50  payer_business_name = Alessandro Bondi's Test Store
25-01-2008 20-50  payment_status = Pending
25-01-2008 20-50  shipping = 0.00
25-01-2008 20-50  mc_gross = 42.00
25-01-2008 20-50  custom = 60
25-01-2008 20-50  charset = windows-1252
25-01-2008 20-50  notify_version = 2.4
25-01-2008 20-50  requestValidation. response from server is: VERIFIED
25-01-2008 20-50  check Field ----
25-01-2008 20-50  ERROR - receiving value doesn't match!!!
25-01-2008 20-50  Field          :payment_status
25-01-2008 20-50  Value          :Pending
25-01-2008 20-50  Expected value :Completed
25-01-2008 20-50  ----
25-01-2008 20-50  checkPaymentStatus faild

eZPaypalType.log:

25-01-2008 20-30  eZPaypalGateway::eZPaypalGateway()
25-01-2008 20-30  execute
25-01-2008 20-30  case EZ_REDIRECT_GATEWAY_OBJECT_NOT_CREATED
25-01-2008 20-30  createPaymentObject
25-01-2008 20-30  createRedirectionUrl
25-01-2008 20-30  createShortDescription
25-01-2008 20-30  descText=Merlot
25-01-2008 20-30  business       = seller_1199786956_biz%40gonet.it
25-01-2008 20-30  item_name      = Merlot
25-01-2008 20-30  custom         = 58
25-01-2008 20-30  no_shipping    = 1
25-01-2008 20-30  localHost      = http://www.cantinalarotta.it
25-01-2008 20-30  amount         = 42
25-01-2008 20-30  currency_code  = EUR
25-01-2008 20-30  notify_url     = http://www.cantinalarotta.it/index.php?/plain_site/paypal/notify_url/
25-01-2008 20-30  return         = http://www.cantinalarotta.it/index.php?/plain_site/shop/checkout/
25-01-2008 20-30  cancel_return  = http://www.cantinalarotta.it/index.php?/plain_site/shop/basket/
25-01-2008 20-30  return EZ_WORKFLOW_TYPE_STATUS_REDIRECT_REPEAT
25-01-2008 20-44  eZPaypalGateway::eZPaypalGateway()
25-01-2008 20-44  execute
25-01-2008 20-44  case EZ_REDIRECT_GATEWAY_OBJECT_NOT_CREATED
25-01-2008 20-44  createPaymentObject
25-01-2008 20-44  createRedirectionUrl
25-01-2008 20-44  createShortDescription
25-01-2008 20-44  descText=Merlot
25-01-2008 20-44  business       = seller_1199786956_biz%40gonet.it
25-01-2008 20-44  item_name      = Merlot
25-01-2008 20-44  custom         = 59
25-01-2008 20-44  no_shipping    = 1
25-01-2008 20-44  localHost      = http://www.cantinalarotta.it
25-01-2008 20-44  amount         = 42
25-01-2008 20-44  currency_code  = EUR
25-01-2008 20-44  notify_url     = http://www.cantinalarotta.it/index.php?/plain_site/paypal/notify_url/
25-01-2008 20-44  return         = http://www.cantinalarotta.it/index.php?/plain_site/shop/checkout/
25-01-2008 20-44  cancel_return  = http://www.cantinalarotta.it/index.php?/plain_site/shop/basket/
25-01-2008 20-44  return EZ_WORKFLOW_TYPE_STATUS_REDIRECT_REPEAT
25-01-2008 20-48  eZPaypalGateway::eZPaypalGateway()
25-01-2008 20-48  execute
25-01-2008 20-48  case EZ_REDIRECT_GATEWAY_OBJECT_NOT_CREATED
25-01-2008 20-48  createPaymentObject
25-01-2008 20-48  createRedirectionUrl
25-01-2008 20-48  createShortDescription
25-01-2008 20-48  descText=Merlot
25-01-2008 20-48  business       = seller_1199786956_biz%40gonet.it
25-01-2008 20-48  item_name      = Merlot
25-01-2008 20-48  custom         = 60
25-01-2008 20-48  no_shipping    = 1
25-01-2008 20-48  localHost      = http://www.cantinalarotta.it
25-01-2008 20-48  amount         = 42
25-01-2008 20-48  currency_code  = EUR
25-01-2008 20-48  notify_url     = http://www.cantinalarotta.it/index.php?/plain_site/paypal/notify_url/
25-01-2008 20-48  return         = http://www.cantinalarotta.it/index.php?/plain_site/shop/checkout/
25-01-2008 20-48  cancel_return  = http://www.cantinalarotta.it/index.php?/plain_site/shop/basket/
25-01-2008 20-48  return EZ_WORKFLOW_TYPE_STATUS_REDIRECT_REPEAT

eZPaymentGatewayType.log:

25-01-2008 20-30  execute
25-01-2008 20-30  execute: EZ_PAYMENT_GATEWAY_GATEWAY_NOT_SELECTED
25-01-2008 20-30  selectGateway: ezpaypal
25-01-2008 20-30  createGateway. gateway_difinition: array(2) {
  ["class_name"]=>
  string(15) "ezpaypalgateway"
  ["description"]=>
  string(6) "Paypal"
}

25-01-2008 20-44  execute
25-01-2008 20-44  execute: EZ_PAYMENT_GATEWAY_GATEWAY_NOT_SELECTED
25-01-2008 20-44  selectGateway: ezpaypal
25-01-2008 20-44  createGateway. gateway_difinition: array(2) {
  ["class_name"]=>
  string(15) "ezpaypalgateway"
  ["description"]=>
  string(6) "Paypal"
}

25-01-2008 20-48  execute
25-01-2008 20-48  execute: EZ_PAYMENT_GATEWAY_GATEWAY_NOT_SELECTED
25-01-2008 20-48  selectGateway: ezpaypal
25-01-2008 20-48  createGateway. gateway_difinition: array(2) {
  ["class_name"]=>
  string(15) "ezpaypalgateway"
  ["description"]=>
  string(6) "Paypal"
}

Please. PLEASE. I really need help. Now I starting to loose money for this.
Anyone can help?

christian bencivenni

Friday 25 January 2008 12:25:02 pm

Another thing.
it seems that no order are generated in the back end!

christian bencivenni

Friday 25 January 2008 12:28:26 pm

I also tried removing the workflow.
Then the order is generated but it remain in a Pending state.
Is it normal?

Elena Ivanova

Friday 25 January 2008 1:09:10 pm

Hi Christian,

About page style - I temporarily commented this line in paypal.ini. But when you enter Sandbox there is a link for defining some style-related stuff (Profile --> Selling Preferences --> Custom Payment Pages). So, I suppose, the name of this style should appear in paypal.ini.

Regarding your second message - is you sandbox business account verified? It is an important requirement.

christian bencivenni

Friday 25 January 2008 9:55:33 pm

Thanks Elena.
I have two question for you:
1. After you commented the line in paypal.ini the extension works correctly?
2. What version of eZ do you have installed? I'm starting think that it can be a version problem...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.