I'm playing a little around and have create a not unique order_id but that's not the point ;)
With the non-unique ID i ran into NotImplementedError:
File "/usr/local/lib/python3.6/site-packages/oscar_docdata/gateway.py", line 345, in create
raise NotImplementedError('Received unknown reply from DocData. Remote Payment not created.')
NotImplementedError: Received unknown reply from DocData. Remote Payment not created.
The suds message is:
MESSAGE: b'<?xml version=\'1.0\' encoding=\'UTF-8\'?><createErrors>Merchant order reference is not unique.</createErrors></S:Body></S:Envelope>'
Has createError changes to createErrors ?!?
The code part is:
# Parse the reply
if hasattr(reply, 'createSuccess'):
order_key = str(reply['createSuccess']['key'])
return CreateReply(order_id, order_key)
elif hasattr(reply, 'createError'):
error = reply.createError.error
log_docdata_error(error, "DocdataClient: failed to create payment for order %s", order_id)
raise DocdataCreateError(error._code, error.value)
else:
raise NotImplementedError('Received unknown reply from DocData. Remote Payment not created.')
So: hasattr(reply, 'createError') must be just changed to hasattr(reply, 'createErrors') ?!?
I'm playing a little around and have create a not unique order_id but that's not the point ;)
With the non-unique ID i ran into NotImplementedError:
The suds message is:
Has createError changes to createErrors ?!?
The code part is:
So:
hasattr(reply, 'createError')
must be just changed tohasattr(reply, 'createErrors')
?!?