When Ogone is setup in "Server to Server" notification, hooks and form alter are not called.
So, order previously transfered to current user (due to security restrictions), is not reassigned to the correct user.

Comments

Sebastien @Actualys created an issue. See original summary.

sebastien m.’s picture

Thanks to maciej.zgadzaj, I've been able to create this first patch.
There is may be other better implementation, so don't hesitate to contribute this issue.

maciej.zgadzaj’s picture

Status: Active » Needs review
StatusFileSize
new1.25 KB

Thanks for the patch Sebastien! Haven't really had time to look into this before, and even now it was just a quick look, few remarks though:
- you need to make sure that the order used Ogone as the payment method, and actually payment was created using admin terminal (otherwise there is no point in calling commerce_ogone_redirect_form_submit(),
- you need to make sure that this commerce_ogone_redirect_form_submit() is not called twice when server-to-server notifications are disabled on Ogone side.

Attached is an updated patch that should take care of both these things - haven't tested it at all though. Feel like giving it a test ride?

sebastien m.’s picture

Status: Needs review » Needs work
sebastien m.’s picture

With this patch the order is correctly set to the original customer, however :
- if order is cancelled on ogone platform, order is still set to the temporary customer
- confirmation order mail is sent with temporary customer details (firstname, lastname) instead of real customer