Hello friends, I am trying to upload the certificates to bring the payments to production. I'm fine until I have to upload SERVER CERTIFICATE and it only allows me a .pem extension while the certificate delivered by Transbank is .crt. What can I do to test in production and start selling. I appreciate your fast response. @feliguez

Comments

Feliguez created an issue. See original summary.

mnico’s picture

Hi, have you tried changing the file extension from .crt to .pem and uploading it?

If not working try to change the file src/Form/WebpayConfigForm.php from

'server_certificate' => ['extensions' => ['pem'], 'label' => $this->t('Server Certificate')],

to

'server_certificate' => ['extensions' => ['crt'], 'label' => $this->t('Server Certificate')],

Regards

Feliguez’s picture

Thanks mnico, I changed it and it works!

I'm afraid with this solution introduced a bug into my certification environment because transbank uses two different extensions per environment. And also break my module on future updates. Thanks again, regards.

mnico’s picture

Assigned: Unassigned » mnico

So the best solution might be to allow both extensions. Solution that should come in the new version of the module.

I will try to upload a patch soon and I will ask you for help so you can test it, to see if it works in both environments.

mnico’s picture

Status: Active » Needs review
StatusFileSize
new827 bytes

Hello, I attach the patch. Please tell me if with this you could continue using both environments.

Feliguez’s picture

Hi, I'm trying to apply that patch but it's been skipped. I'm running the following code from Webpay root directory:
git apply -v upload-production-certificate-3132315-5.patch
My Terminal returns Skipped patch 'src/Form/WebpayConfigForm.php'. when I execute that command

mnico’s picture

What version of the module are you using? 8.x-2.0-beta1?

I have been able to apply the patch in version 8.x-2.0-beta1 and 8.x-2.0-dev, is it possible that you have other modifications applied?

Well, the patch only adds the ability to attach files with .pem and .crt extensions.

'server_certificate' => ['extensions' => ['pem crt'], 'label' => $this->t('Server Certificate')],

To the variable "client_certificate" also just in case.

  • mnico committed 403b18c on 8.x-2.x
    Issue #3132315 by mnico: Upload production certificate
    
mnico’s picture

Status: Needs review » Fixed

Well the patch was applied so I will close this issue. I think you failed to apply the patch because you had already changed the code by my suggestions from the first comment.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.