Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging of SSL connection details #2862

Merged
merged 1 commit into from
May 31, 2018
Merged

Conversation

bdewater
Copy link
Contributor

On June 30 the PCI DSS mandates TLS 1.1 or better for securely transmitting payment data. This refinement to Net::HTTP allows us to get the required details within the scope of the ActiveMerchant::Connection class, without monkey patching globally.

Example output:

irb(main):004:0> gw.authorize(100, "test")
I, [2018-05-30T11:22:44.565084 #44620]  INFO -- : [ActiveMerchant::Billing::PayflowGateway] connection_http_method=POST connection_uri=https://payflowpro.paypal.com
I, [2018-05-30T11:22:45.165265 #44620]  INFO -- : [ActiveMerchant::Billing::PayflowGateway] connection_ssl_version=TLSv1.2 connection_ssl_cipher=ECDHE-RSA-AES128-GCM-SHA256

Copy link
Contributor

@filipebarcos filipebarcos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet! ❤️

On June 30 the PCI DSS mandates TLS 1.1 or better for securely transmitting payment data. This refinement to Net::HTTP allows us to get the required details within the scope of the ActiveMerchant::Connection class, without monkey patching globally.

Example output:
```
irb(main):004:0> gw.authorize(100, "test")
I, [2018-05-30T11:22:44.565084 #44620]  INFO -- : [ActiveMerchant::Billing::PayflowGateway] connection_http_method=POST connection_uri=https://payflowpro.paypal.com
I, [2018-05-30T11:22:45.165265 #44620]  INFO -- : [ActiveMerchant::Billing::PayflowGateway] connection_ssl_version=TLSv1.2 connection_ssl_cipher=ECDHE-RSA-AES128-GCM-SHA256
```
require 'net/http'

module NetHttpSslConnection
refine Net::HTTP do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 refine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants