Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #339 from solidusio/elia/dev-support-update
Browse files Browse the repository at this point in the history
Update to the latest dev-support defaults
  • Loading branch information
elia authored Dec 12, 2022
2 parents 6930373 + 1ba7bda commit 61b7a9a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 33 deletions.
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
SolidusPaypalBraintree
======================
# SolidusPaypalBraintree

[![CircleCI](https://circleci.com/gh/solidusio/solidus_paypal_braintree.svg?style=svg)](https://circleci.com/gh/solidusio/solidus_paypal_braintree)
[![CircleCI](https://circleci.com/gh/solidusio/solidus_paypal_braintree.svg?style=shield)](https://circleci.com/gh/solidusio/solidus_paypal_braintree)
[![codecov](https://codecov.io/gh/solidusio/solidus_paypal_braintree/branch/master/graph/badge.svg)](https://codecov.io/gh/solidusio/solidus_paypal_braintree)

`solidus_paypal_braintree` is an extension that adds support for using [Braintree](https://www.braintreepayments.com) as a payment source in your [Solidus](https://solidus.io/) store. It supports Apple Pay, PayPal, and credit card transactions.

🚧 This extension is currently only compatible with the legacy `solidus_frontend`.
🚧 This extension is currently only compatible with the legacy `solidus_frontend` 🚧

Installation
------------
## Installation

Add solidus_paypal_braintree to your Gemfile:

Expand Down Expand Up @@ -200,15 +199,14 @@ Note, other images such as Venmo's full logo and shortened "V" logo are included

Ensure that you follow [Venmo's guidelines](https://developer.paypal.com/braintree/docs/files/venmo-merchant-integration-guidelines.pdf) when making other style changes, otherwise failing to comply can lead to an interruption of your Venmo service.

PayPal
------
## PayPal

A default checkout view is provided that will display PayPal as a payment option.
It will only be displayed if the `SolidusPaypalBraintree::Gateway` payment
method is configured to display on the frontend and PayPal is enabled in the
store's configuration.

You can find button configuration options in
You can find button configuration options in
`/solidus_paypal_braintree/configurations/list` if you want to change the color,
shape, layout, and a few other options. For more information check out
[PayPal's documentation](https://developer.paypal.com/docs/platforms/checkout/reference/style-guide/#layout).
Expand Down Expand Up @@ -342,8 +340,7 @@ Once enabled, you can use the following card numbers to test 3DS 2 on your
client side in sandbox:
https://developers.braintreepayments.com/guides/3d-secure/migration/javascript/v3#client-side-sandbox-testing.

Testing
-------
## Testing

To run the specs it is required to set the Braintree test account data in these environment variables:
`BRAINTREE_PUBLIC_KEY`, `BRAINTREE_PRIVATE_KEY`, `BRAINTREE_MERCHANT_ID` and `BRAINTREE_PAYPAL_PAYEE_EMAIL`
Expand All @@ -362,8 +359,7 @@ Simply add this require statement to your spec_helper:
require 'solidus_paypal_braintree/factories'
```

Development
-------
## Development

### Mocking your buyer country
PayPal looks at the buyer's IP geolocation to determine what funding sources should be available to them. Because for example, Venmo is currently only available to US buyers. Because of this, you may want to pretend that you are from US so you can check if Venmo is correctly integrated for these customers. To do this, set the payment method's preference of `force_buyer_country` to "US". See more information about preferences above.
Expand All @@ -384,6 +380,13 @@ $ bin/rails server
=> Rails 7.0.4 application starting in development
* Listening on tcp://127.0.0.1:3000
Use Ctrl-C to stop
```


### Releasing new versions

Please refer to the dedicated [page](https://github.com/solidusio/solidus/wiki/How-to-release-extensions) on Solidus wiki.


## License

Expand Down
2 changes: 2 additions & 0 deletions lib/solidus_paypal_braintree/extension_configuration.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

module SolidusPaypalBraintree
# Deviating from the usual `Configuration` name proposed by
# `solidus_dev_support` because it's already taken by a model.
class ExtensionConfiguration
# Define here the settings for this extension, e.g.:
#
Expand Down
40 changes: 20 additions & 20 deletions solidus_paypal_braintree.gemspec
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# frozen_string_literal: true

$:.push File.expand_path('lib', __dir__)
require 'solidus_paypal_braintree/version'
require_relative 'lib/solidus_paypal_braintree/version'

Gem::Specification.new do |spec|
spec.name = 'solidus_paypal_braintree'
spec.version = SolidusPaypalBraintree::VERSION
spec.summary = 'Officially supported Paypal/Braintree extension'
spec.name = 'solidus_paypal_braintree'
spec.version = SolidusPaypalBraintree::VERSION
spec.authors = ['Stembolt']
spec.email = '[email protected]'

spec.summary = 'Officially supported Paypal/Braintree extension'
spec.description = 'Uses the javascript API for seamless braintree payments'
spec.license = 'BSD-3-Clause'
spec.homepage = 'https://github.com/solidusio/solidus_paypal_braintree'
spec.license = 'BSD-3-Clause'

spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = 'https://github.com/solidusio/solidus_paypal_braintree'
spec.metadata['changelog_uri'] = 'https://github.com/solidusio/solidus_paypal_braintree/blob/master/CHANGELOG.md'

spec.author = 'Stembolt'
spec.email = '[email protected]'
spec.homepage = 'https://github.com/solidusio/solidus_paypal_braintree'
spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4')

spec.required_ruby_version = '>= 2.5'
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") }

spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end
spec.files = files.grep_v(%r{^(test|spec|features)/})
spec.test_files = files.grep(%r{^(test|spec|features)/})
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

if spec.respond_to?(:metadata)
spec.metadata["homepage_uri"] = spec.homepage if spec.homepage
spec.metadata["source_code_uri"] = spec.homepage if spec.homepage
spec.metadata["rubygems_mfa_required"] = 'true'
end

spec.add_dependency 'activemerchant', '~> 1.48'
spec.add_dependency 'braintree', '~> 3.4'
spec.add_dependency 'solidus_api', ['>= 2.4.0', '< 4']
Expand Down

0 comments on commit 61b7a9a

Please sign in to comment.