PAYONE-GmbH / shopware-5

PAYONE Payment Plugin for shopware 5
MIT License
10 stars 24 forks source link

wrong customer ip with loadbalancer setup #29

Closed emtii closed 8 years ago

emtii commented 8 years ago

Hi, currently we face the issue that in a setup with loadbalancer the plugin always submit the ip of the loadbalancer to payone instead of the customer ip.

Could you please have a look into that one? Thank you.

fjbender commented 8 years ago

@Fatchip-Support: IP is apparently set in \Mopt_PayoneParamBuilder::getPersonalData and grabbed from $_SERVER superglobal. Probably, a patch is needed to grab it from some kind of X-Forwarded-For header, if present.

@emtii: Does your loadbalacer setup provide the actual customer's IP in any header fields?

FATCHIP-GmbH commented 8 years ago

Hi, i just added the necessary check, so that whenever the X-Forwarded-For Header is found it will be preferred over the REMOTE_ADDR Header.

emtii commented 8 years ago

ok thank you, payolution has to check this now

emtii commented 8 years ago

feedback is was fixed, so i close this one for now.