PAYONE-GmbH / magento-2

PAYONE Payment Extension for Magento 2
28 stars 56 forks source link

PayOne ApplePay compatibility with Magento Cloud #493

Closed hannes011 closed 1 year ago

hannes011 commented 1 year ago

Hi,

We are currently trying to upload the ApplePay Certificate in the configuration area of Magento Admin Panel. Unfortunately, Magento Cloud is throwing the error "Warning: mkdir(): Read-only file system" since the upload is causing a mkdir-call for "vendor/payone-gmbh/magento-2/ApplePay":

\Payone\Core\Model\System\Config\Backend\Upload::moveFile#100

Solution would be (since Magento Cloud has write permissions only in directory "var") to change the path in \Payone\Core\Helper\ApplePay::getApplePayUploadPath#43 to "var/payone-gmbh/ApplePay" or so.

I'm currently using PayOne version 3.7.0

janteuber commented 1 year ago

Hello @hannes011 ,

Thank you very much for your message.

I have forwarded this issue to my colleagues and will get back to you as soon as there are any news.

janteuber commented 1 year ago

Hello @hannes011 ,

We have refactored the file upload so that it should also work for Magento Cloud users: (Which we can't test due to lack of access to a Magento Cloud store).

The solution is also built backwards compatible. So new files are uploaded to the new location. Old files from before the update will be recognized and loaded accordingly as long as no new upload has taken place.

The old folder was SHOPROOT/vendor/payone-gmbh/magento-2/ApplePay/. The new folder is SHOPROOT/var/payone-gmbh/ApplePay/

Can you please have a look if this Pull-Request fits for you.