• Welcome to KonaKart Community Forum. Please login or sign up.
 

Paypal callback problem

Started by Burz, January 14, 2008, 07:25:44 pm

Previous topic - Next topic

Burz

We are unable to get the Paypal module working from KonaKart 2.2.0.6. When customer is redirected to Paypal sandbox, the order details appear, then hit Pay Now and the next page just displays two links: "Retry" and "Go to home page".

The order status remains Waiting for payment in KonaKart.

We've verified the Paypal payment zone (Massachusetts), the callback username and pwd (user@emaildomain.com) which we can login to the shop with.

Callback URL is "http://www.thecrystalshard.com:80/shop/PayPalCallback.do"

Return URL is "http://host:port/shop/CheckoutFinished.do"

Cancel URL is "http://host:port/CatalogCheckoutExternalPaymentErrorPage.do"

Test Mode is "True"

Paypal ID is the sandbox seller's account of the form "user_028179402_name@maildomain.com"

Transaction currency is "USD"

Should we really be following the example of http for the callback? Or is httpS support required for the paypal callback?

pete

Quote
When customer is redirected to Paypal sandbox, the order details appear, then hit Pay Now and the next page just displays two links: "Retry" and "Go to home page".

I'm not sure I understand. You are on the PayPal sandbox and it doesn't let you pay for the order although the payment details are shown ?

Quote
We've verified the Paypal payment zone (Massachusetts), the callback username and pwd (user@emaildomain.com) which we can login to the shop with.

Callback URL is "http://www.thecrystalshard.com:80/shop/PayPalCallback.do"

Return URL is "http://host:port/shop/CheckoutFinished.do"

Cancel URL is "http://host:port/CatalogCheckoutExternalPaymentErrorPage.do"

Test Mode is "True"

Paypal ID is the sandbox seller's account of the form "user_028179402_name@maildomain.com"

Transaction currency is "USD"

Should we really be following the example of http for the callback? Or is httpS support required for the paypal callback?


You should be using https in production but I think that http will also work for testing purposes. One thing that you could do is to put a debug statement in the PayPalCallback Action to see whether PayPal is ever calling it. If it gets called, then the state of the order should be changed and a record with the details of the PayPal callback should be written in the ipn_history table (which you can view through the Admin App).

-Pete

Burz

Yes, we are testing with the Paypal sandbox.

It would be good to know in the affirmative whether or not the callback can work with http. As such we have not setup an SSL certificate yet, but thought we could successfully test without it.

I haven't modified any actions yet, only JSPs so far, so not sure where to start.

pete

Quote
It would be good to know in the affirmative whether or not the callback can work with http. As such we have not setup an SSL certificate yet, but thought we could successfully test without it.


We've just tested this out and can confirm that a non SSL callback will work. The callback changes the state of the order and you get a callback record inserted into the database. See attached screenshot:

Burz

Thanks, Pete.

I'm not sure what could be going wrong on our end. Perhaps it is a bug in 2.2.0.6, or a typo in the settings. In any case, no callback records are showing up.

One thing we don't have yet is a dedicated IP address. I wonder if that could be the cause.

Burz

Here is the last status message for the Paypal sandbox:
QuoteStandard Payment flow has been unavailable on PayPal Production Sandbox site since 3:00 AM PST (11:00 AM GMT) 2008-01-14.

I think they're trying to say its down.

Burz

(sigh) Wait a minute...

They weren't showing up on kkadmin when we were testing, but I can now see a bunch of call back records. All say "We were not sent the secret key" in the result description, result code is -2, order ID is -1. Other fields blank.

I don't know the significance of this error message, whether its coming from Paypal or Kona, even though I've searched both support sites.

pete

Quote
They weren't showing up on kkadmin when we were testing, but I can now see a bunch of call back records. All say "We were not sent the secret key" in the result description, result code is -2, order ID is -1. Other fields blank.


These are probably records that you created by manually calling the callback URL. When a transaction is sent to PayPal we generate a secret key and expect that key to be sent back to us so during the callback so that we can associate the callback to an order. If we don't get the secret key, then we log the callback but don't actually use it. PayPal callback will work even if you don't have a dedicated ip address. One way of testing to see whether your callback URL is visible from the internet is to call the URL from the internet (or through one of those anonymous proxies) and see whether a callback record is logged.

Take a look at com.konakart.actions.ipn.PayPalAction.java to understand the error codes better.

sunshiva

Hello

I came across this document on the Paypal developers network. Hope it helps
https://www.paypal.com/IntegrationCenter/ic_ipn.html

Regards

Shiva

Burz

Thanks again everyone. The problem was that Paypal sandboxed happened to be down for that stretch of time we had allocated for testing.  Our test orders are working now.

:)

pete

That's good news. Let us know when you are live.

-Pete