spree_paypal_api_checkout 0.0.3 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -13
- data/app/controllers/spree/admin/paypal_checkout_payments_controller.rb +1 -1
- data/app/models/spree/gateway/pay_pal_checkout.rb +1 -1
- data/app/views/spree/checkout/payment/_paypal_checkout.html.erb +1 -1
- data/config/routes.rb +0 -1
- data/lib/spree_paypal_api_checkout/version.rb +1 -1
- data/spree_paypal_api_checkout.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2d5c1380a64e977885a5654cb5ad51252b873d4111ab7afa3502604bf478e58
|
4
|
+
data.tar.gz: 8318b8560107a17f02ee3ced1c2b6b469633fcbbe32ce73008a7528adb833f99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1898e5770e862572b17cc976f70f385afa521f8390f3a4c9ffd70bd1c1654b8bcad0c84c9f271ec74f00daaa826887e0482fd44561718c2be5296bf9ec6ca35
|
7
|
+
data.tar.gz: 5e5c22d36c999c412838b78365686a356815ed84fda9d99a88acc3000c34c21fe2ca3ce08e0250a3de2d364f325648444073a1868c462b4194e4ac4d1666e037
|
data/README.md
CHANGED
@@ -1,14 +1,10 @@
|
|
1
1
|
# Spree PayPal checkout
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/spree-contrib/better_spree_paypal_checkout.svg?branch=master)](https://travis-ci.org/spree-contrib/better_spree_paypal_checkout)
|
4
|
-
|
5
|
-
This is the official Paypal checkout extension for Spree.
|
6
|
-
|
7
3
|
## Installation
|
8
4
|
|
9
5
|
1. Add this extension to your Gemfile with this line:
|
10
6
|
|
11
|
-
gem '
|
7
|
+
gem 'spree_paypal_api_checkout', '~> 0.0.6'
|
12
8
|
|
13
9
|
2. Install the gem using Bundler:
|
14
10
|
|
@@ -16,6 +12,7 @@ This is the official Paypal checkout extension for Spree.
|
|
16
12
|
|
17
13
|
3. Copy & run migrations
|
18
14
|
|
15
|
+
bundle exec rake railties:install:migrations
|
19
16
|
bundle exec rails g spree_paypal_api_checkout:install
|
20
17
|
|
21
18
|
4. Restart your server
|
@@ -26,7 +23,7 @@ This is the official Paypal checkout extension for Spree.
|
|
26
23
|
|
27
24
|
#### PayPal
|
28
25
|
|
29
|
-
Go to [PayPal's Developer Website](https://developer.paypal.com/), sign in with your PayPal account, click "Applications" then "Sandbox Accounts" and create a new "Business" account.
|
26
|
+
Go to [PayPal's Developer Website](https://developer.paypal.com/), sign in with your PayPal account, click "Applications" then "Sandbox Accounts" and create a new "Business" account. There you will get your CLIENT ID and CLIENT SECRET KEY.
|
30
27
|
|
31
28
|
You will also need a "Personal" account to test the transactions on your site. Create this in the same way, finding the account information under "Profile" as well. You may need to set a password in order to be able to log in to PayPal's sandbox for this user.
|
32
29
|
|
@@ -38,18 +35,13 @@ In Spree, go to the admin backend, click "Configuration" and then "Payment Metho
|
|
38
35
|
|
39
36
|
#### PayPal
|
40
37
|
|
41
|
-
|
42
|
-
|
43
|
-
If you are unable to find it, then follow [PayPal's own documentation](https://developer.paypal.com/webapps/developer/docs/classic/api/apiCredentials/).
|
38
|
+
Go to [PayPal's Developer Website](https://developer.paypal.com/), sign in with your PayPal account, click "Applications" then "Sandbox Accounts" and create a new "Business" account. There you will get your CLIENT ID and CLIENT SECRET KEY.
|
44
39
|
|
45
|
-
|
40
|
+
### Spree Setup
|
46
41
|
|
47
42
|
Same as sandbox setup, but change "Server" from "sandbox" to "live".
|
48
43
|
|
49
44
|
## Configuration
|
50
45
|
This Spree extension supports *some* of those. If your favourite is not here, then please submit an issue about it, or better still a patch to add it in.
|
51
46
|
|
52
|
-
|
53
47
|
**Must** be an absolute path to the image.
|
54
|
-
|
55
|
-
## Caveats
|
@@ -3,7 +3,7 @@ module Spree
|
|
3
3
|
before_action :load_order
|
4
4
|
|
5
5
|
def index
|
6
|
-
@payments = @order.payments.includes(:payment_method).where(:spree_payment_methods => {
|
6
|
+
@payments = @order.payments.includes(:payment_method).where(:spree_payment_methods => {:name => 'PayPal Checkout'})
|
7
7
|
end
|
8
8
|
|
9
9
|
private
|
@@ -2,7 +2,7 @@ module Spree
|
|
2
2
|
class Gateway::PayPalCheckout < Gateway
|
3
3
|
preference :api_key, :string
|
4
4
|
preference :secret_key, :string
|
5
|
-
preference :server, :string, default: '
|
5
|
+
preference :server, :string, default: 'api-m.sandbox.paypal.com'
|
6
6
|
|
7
7
|
def supports?(source)
|
8
8
|
true
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div id="paypal-button-container" class="paypal-button-container"></div>
|
2
2
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
3
|
-
<script type="text/javascript" src="https://www.paypal.com/sdk/js?client-id=<%= payment_method.
|
3
|
+
<script type="text/javascript" src="https://www.paypal.com/sdk/js?client-id=<%= payment_method.preferred_api_key %>¤cy=<%= @order.currency %>"></script>
|
4
4
|
|
5
5
|
<script type="text/javascript">
|
6
6
|
paypal.Buttons({
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
Spree::Core::Engine.add_routes do
|
2
2
|
post '/paypal_checkout', :to => "paypal_checkout#express", :as => :paypal_checkout
|
3
|
-
post '/paypal_checkout/authorize', :to => "paypal_checkout#authorize", :as => :authorize_paypal_checkout
|
4
3
|
post '/paypal_checkout/confirm', :to => "paypal_checkout#confirm", :as => :confirm_paypal_checkout
|
5
4
|
get '/paypal_checkout/cancel', :to => "paypal_checkout#cancel", :as => :cancel_paypal_checkout
|
6
5
|
get '/paypal_checkout/notify', :to => "paypal_checkout#notify", :as => :notify_paypal_checkout
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "spree_paypal_api_checkout".freeze
|
3
|
-
s.version = "0.0.
|
3
|
+
s.version = "0.0.6"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
6
6
|
s.require_paths = ["lib".freeze]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_paypal_api_checkout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spree Commerce
|
@@ -401,7 +401,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
401
401
|
version: '0'
|
402
402
|
requirements:
|
403
403
|
- none
|
404
|
-
rubygems_version: 3.
|
404
|
+
rubygems_version: 3.0.3
|
405
405
|
signing_key:
|
406
406
|
specification_version: 4
|
407
407
|
summary: Adds PayPal API Checkout as a Payment Method to Spree Commerce
|