Closed jedie closed 5 years ago
Think there is a Bug in sandbox: The order will be created and i see it in the test backoffice "Payment Report"... But all orders are closed: the "Payment Cluster state" is: "closed_canceled" ... I guess that's wrong, right? Otherwise it's not possible to play around different situations.
I don't know why this happens in your situation. I just tested an order with the sandbox and it looks like this in the test backoffice:
One more question: In the sandbox the payment method is asked in the "checkout wizard" ... It should be possible to move that into the docdata Payment Page, isn't it? How to do this?
You should skip this view then and I think you can ask for the menu without any default pm (then docdata will show the available options):
url = facade.get_payment_menu_url(self.request, docdata_ref)
Thanks for response. Here it looks like:
Here a example log output: https://gist.github.com/jedie/41aa1f7ea5afe200cde8a71f4e7172bc
From your log output:
...
"POST /checkout/preview/ HTTP/1.1" 302 0
Returned from Docdata for A26A593801CF5FEBD8A6A084282F6238, callback: ERROR
...
So something went wrong with the payment as the ERROR callback was called from Docdata.
So something went wrong with the payment as the ERROR callback was called from Docdata.
Thank you for pointing that out.
But i used the default sandbox settings. The only thing I can spontaneously think of are the "Merchant URLs" in the testbackoffice under "Settings / View/Edit Merchant Profile / URL" ?
This condition should then be mentioned in the README, right?
Those URL's are the callback url's for delayed payments so Docdata can notify the Oscar system. In this case you are redirected immediately back by the callback URL from the payment menu, so this is not related to these Merchant URL settings.
In your case there was an error with the actual payment, that's why you are (directly) redirected back with an ERROR callback.
In your case there was an error with the actual payment, that's why you are (directly) redirected back with an ERROR callback.
Okay. Then the questions is: What's happens here? You use the same sandbox setup and it works and i used the same and it doesn't ?!?
Well something goes wrong with the actual payment (and the selected payment provider), that's why there is an error callback.
This is happening outside the sandbox application, as the callback is just a result of the actual payment.
What is the payment method you use? What do you seen when you follow the flow and come back?
I didn't see any page from docdata, because i will be redirected form
directly back to
see:
That's with all payment method.
So the error occurs at Docdata.
Can you post the complete redirect url? (the https://test.docdatapayments.com/ps/menu?...
)
https://test.docdatapayments.com/ps/menu?command=show_payment_cluster&payment_cluster_key=07...23&merchant_name=foo_bar&return_url_success=http%3A%2F%2F127.0.0.1%3A8000%2Fapi%2Fdocdata%2Freturn%2F%3Fcallback%3DSUCCESS%26order_id%3D07...23&return_url_pending=http%3A%2F%2F127.0.0.1%3A8000%2Fapi%2Fdocdata%2Freturn%2F%3Fcallback%3DPENDING%26order_id%3D07...23&return_url_canceled=http%3A%2F%2F127.0.0.1%3A8000%2Fapi%2Fdocdata%2Freturn%2F%3Fcallback%3DCANCELLED%26order_id%3D0...23&return_url_error=http%3A%2F%2F127.0.0.1%3A8000%2Fapi%2Fdocdata%2Freturn%2F%3Fcallback%3DERROR%26order_id%3D07...23&client_language=EN-US&default_pm=IDEAL
The merchant_name=foo_bar
is in your real situation replaced with the correct merchant name right?
Other than that I don't see any strange thing heres: The payment_cluster_key
was successfully returned in an earlier call by Docdata's API and the rest of the URL looks fine to me.
You should contact Docdata about this: The error occurs in their platform.
The
merchant_name=foo_bar
is in your real situation replaced with the correct merchant name right?
Yes, it's the real merchant name and i replace it here...
Btw. i also try the new SKIP_PAYMENT_CHOICES=True
with the same result.
I will contact docdata...
SKIP_PAYMENT_CHOICES=1
(not True, see https://github.com/django-oscar/django-oscar-docdata/blob/master/sandbox/settings.py#L225)
Sorry. I set SKIP_PAYMENT_CHOICES=True directly into src/django-oscar-docdata/sandbox/settings.py
I'm in contact with docdata... First idea from them: "&client_language=EN-US" should be "&client_language=en"
I changed oscar_docdata/gateway.py
@@ -480,7 +480,7 @@ class DocdataClient(object):
'return_url_pending': url_format.format(return_url, callback='PENDING', order_id=order_key),
'return_url_canceled': url_format.format(return_url, callback='CANCELLED', order_id=order_key),
'return_url_error': url_format.format(return_url, callback='ERROR', order_id=order_key),
- 'client_language': (client_language or get_language()).upper()
+ 'client_language': to_iso639_part1(client_language or get_language())
}
args.update(extra_url_args)
@@ -1113,4 +1113,6 @@ def to_iso639_part1(language_code):
"""
Convert codes like "en-us" to "en"
"""
- return language_code.split('-', 1)[0]
+ return language_code.split('-', 1)[0].lower()
But nothing changed: cancelled immediately
The fault was with the docdata provider. They changed something and now it works.
I start with a fresh sandbox virtualenv, inserted my docdata test backoffice settings and creates some orders... (with
DOCDATA_ORDER_ID_START
offset ;) )Think there is a Bug in sandbox: The order will be created and i see it in the test backoffice "Payment Report"... But all orders are closed: the "Payment Cluster state" is: "closed_canceled" ... I guess that's wrong, right? Otherwise it's not possible to play around different situations.
One more question: In the sandbox the payment method is asked in the "checkout wizard" ... It should be possible to move that into the docdata Payment Page, isn't it? How to do this?