paypal-checkout-sdk 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +139 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +48 -0
- data/LICENSE +86 -0
- data/README.md +142 -0
- data/Rakefile +6 -0
- data/gen.yml +6 -0
- data/homepage.jpg +0 -0
- data/init +0 -0
- data/lib/core/version.rb +1 -1
- data/paypal-checkout-sdk.gemspec +26 -12
- data/samples/authorize_intent_examples/authorize_order.rb +52 -0
- data/samples/authorize_intent_examples/capture_order.rb +44 -0
- data/samples/authorize_intent_examples/create_order.rb +191 -0
- data/samples/authorize_intent_examples/run_all.rb +57 -0
- data/samples/capture_intent_examples/capture_order.rb +50 -0
- data/samples/capture_intent_examples/create_order.rb +138 -0
- data/samples/capture_intent_examples/run_all.rb +58 -0
- data/samples/get_order.rb +43 -0
- data/samples/patch_order.rb +53 -0
- data/samples/paypal_client.rb +40 -0
- data/samples/refund_capture.rb +46 -0
- metadata +82 -22
- data/spec/orders/orders_authorize_spec.rb +0 -18
- data/spec/orders/orders_capture_spec.rb +0 -18
- data/spec/orders/orders_create_spec.rb +0 -36
- data/spec/orders/orders_get_spec.rb +0 -37
- data/spec/orders/orders_helper.rb +0 -33
- data/spec/orders/orders_patch_spec.rb +0 -60
- data/spec/orders/orders_validate_spec.rb +0 -18
- data/spec/payments/authorizations_capture_spec.rb +0 -18
- data/spec/payments/authorizations_get_spec.rb +0 -18
- data/spec/payments/authorizations_reauthorize_spec.rb +0 -17
- data/spec/payments/authorizations_void_spec.rb +0 -17
- data/spec/payments/captures_get_spec.rb +0 -18
- data/spec/payments/captures_refund_spec.rb +0 -18
- data/spec/payments/refunds_get_spec.rb +0 -18
- data/spec/spec_helper.rb +0 -109
- data/spec/test_harness.rb +0 -25
data/spec/test_harness.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'braintreehttp'
|
2
|
-
require './lib/paypal-checkout-sdk'
|
3
|
-
|
4
|
-
module TestHarness
|
5
|
-
class << self
|
6
|
-
def environment
|
7
|
-
client_id = ENV['PAYPAL_CLIENT_ID'] || '<<PAYPAL-CLIENT-ID>>'
|
8
|
-
client_secret = ENV['PAYPAL_CLIENT_SECRET'] || '<<PAYPAL-CLIENT-SECRET>>'
|
9
|
-
|
10
|
-
PayPal::SandboxEnvironment.new(client_id, client_secret)
|
11
|
-
end
|
12
|
-
|
13
|
-
def client
|
14
|
-
PayPal::PayPalHttpClient.new(self.environment)
|
15
|
-
end
|
16
|
-
|
17
|
-
def exec(req, body = nil)
|
18
|
-
if body
|
19
|
-
req.request_body(body)
|
20
|
-
end
|
21
|
-
|
22
|
-
client.execute(req)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|