kmitgroup / google-checkout-php-sample-code

Automatically exported from code.google.com/p/google-checkout-php-sample-code
0 stars 0 forks source link

Serial-number is not parsed right #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Everytime I get a notification from google checkout I get something like this:

<new-order-notification xmlns="http://checkout.google.com/schema/2" 
serial-number="219457022059646-00001-7">

But if a send a response like this:
$Gresponse->SendAck($data[$root]['google-order-number']['VALUE'], true);

Then the api sends this ack:
<notification-acknowledgment xmlns="http://checkout.google.com/schema/2" 
serial-number="219457022059646" />

The API is eating the characters after the dash.

Please fix this as I can find where is the problem.

Original issue reported on code.google.com by stef...@padilla.co.uk on 18 Mar 2011 at 6:40

GoogleCodeExporter commented 9 years ago
Ok, got it now, for version 2.5 you need to send and ack with the serial number 
of the notification, not the order number. So it would be something like:

 $Gresponse->SendAck($data[$root]['serial-number'], true);

where in your demo files you have something like:

 $Gresponse->SendAck(); << this does not work and you keep getting notifications.

Original comment by stef...@padilla.co.uk on 21 Mar 2011 at 11:42

GoogleCodeExporter commented 9 years ago
Am not a php dev - 
SendAck() seems to be for pre 2.5 serial number notifications where you can 
just acknowledge with an HTTP 200 (only, no serial #) and without the setting 
in your account that you will handshake respond with serial no.

Original comment by edcha...@gmail.com on 1 May 2011 at 2:22

GoogleCodeExporter commented 9 years ago
i have used api version 2.5 i have properly send 
$Gresponse->SendAck($data[$root]['serial-number'], true);
 but i have got a problem again and again call new order notification why do this 

Original comment by kl.nag...@gmail.com on 9 Feb 2012 at 7:02