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 device data collection #116

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

gsmendoza
Copy link
Contributor

Closes #115.

Revision of #103.

This commit adds device data collection.

See: https://developer.paypal.com/braintree/docs/guides/premium-fraud-management-tools/device-data-collection

Testing

Confirmed after checking out with Braintree Credit Card payment method:

image

image

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@gsmendoza gsmendoza self-assigned this Mar 2, 2023
@@ -7,6 +7,7 @@ SolidusBraintree.HostedForm.prototype.initialize = function() {
this.client = SolidusBraintree.createClient({
paymentMethodId: this.paymentMethodId,
useThreeDSecure: (typeof(window.threeDSecureOptions) !== 'undefined'),
useDataCollector: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@SyborgStudios I removed the IS_FRONTEND const since we now have separate hosted_form JS files for frontend and backend.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Awesome. I was not happy with it anyways.

@gsmendoza
Copy link
Contributor Author

@SyborgStudios I made the following minor changes to your PR:

  1. Removed IS_FRONTEND.
  2. Fixed lint errors.

Can you review?

Copy link
Contributor

@waiting-for-dev waiting-for-dev left a comment

Choose a reason for hiding this comment

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

Thanks, @gsmendoza, good job! I left two minor suggestions but feel free to merge.

app/models/solidus_braintree/gateway.rb Outdated Show resolved Hide resolved
spec/models/solidus_braintree/gateway_spec.rb Outdated Show resolved Hide resolved
@gsmendoza gsmendoza force-pushed the gsmendoza/115-add-device-data-collection branch from d4fc255 to 3817011 Compare March 2, 2023 23:59
@gsmendoza
Copy link
Contributor Author

@SyborgStudios I'm merging this now :)

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.

Add device data collection
5 participants