paypal-sdk-core 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ae30ef01b809a2b34d440a5799a3f064aab1147
|
4
|
+
data.tar.gz: 1d809f538b42ebdaafcaabcf73eea8087cf435f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dc5687b41463349af976f353bc66e88dca8234be5b9ddadb95d98220887a4206dc4511437c302a2ec77afdcf30c906157d1b9714dfded9ed042a684bcb7a27a
|
7
|
+
data.tar.gz: 7858faa628589329cd1d898a901b7aa9d1588a700543ea701ca015edf9459f17f72d8680fa11609bc2bd81d16d8d1067b99dbecaec4c2c9ff8466678e0b9c806
|
data/CHANGELOG.txt
CHANGED
@@ -51,7 +51,9 @@ module PayPal::SDK::Core
|
|
51
51
|
begin
|
52
52
|
@token_request_at = Time.now
|
53
53
|
basic_auth = ["#{config.client_id}:#{config.client_secret}"].pack('m').delete("\r\n")
|
54
|
-
token_headers = default_http_header.merge(
|
54
|
+
token_headers = default_http_header.merge({
|
55
|
+
"Content-Type" => "application/x-www-form-urlencoded",
|
56
|
+
"Authorization" => "Basic #{basic_auth}" })
|
55
57
|
response = http_call( :method => :post, :uri => token_uri, :body => TOKEN_REQUEST_PARAMS, :header => token_headers )
|
56
58
|
MultiJson.load(response.body, :symbolize_keys => true)
|
57
59
|
end
|
@@ -180,5 +180,10 @@ describe PayPal::SDK::Core::API::DataTypes::Base do
|
|
180
180
|
test_simple_type.created_at.should be_a DateTime
|
181
181
|
end
|
182
182
|
|
183
|
+
it "should allow date with value 0" do
|
184
|
+
test_simple_type = TestSimpleType.new( :created_at => "0" )
|
185
|
+
test_simple_type.created_at.should be_a DateTime
|
186
|
+
end
|
187
|
+
|
183
188
|
end
|
184
189
|
|
data/spec/log/rest_http.log
CHANGED
@@ -2,43 +2,43 @@ opening connection to api.sandbox.paypal.com:443...
|
|
2
2
|
opened
|
3
3
|
starting SSL for api.sandbox.paypal.com:443...
|
4
4
|
SSL established
|
5
|
-
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
5
|
+
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer Osw2KQ0OeYElPQAtMeRH7b5Q7l-qh.xjSd7hQSOwib8\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.5 (paypal-sdk-core 0.2.5; ruby 2.0.0p0-x86_64-darwin12.3.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\nContent-Length: 286\r\n\r\n"
|
6
6
|
<- "{\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"4417119669820331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"}}]}"
|
7
7
|
-> "HTTP/1.1 201 Created\r\n"
|
8
8
|
-> "Server: Apache-Coyote/1.1\r\n"
|
9
|
-
-> "Date:
|
10
|
-
-> "PayPal-Debug-Id:
|
9
|
+
-> "Date: Thu, 27 Jun 2013 10:49:48 GMT\r\n"
|
10
|
+
-> "PayPal-Debug-Id: 8f71eea801269\r\n"
|
11
11
|
-> "Content-Type: application/json\r\n"
|
12
12
|
-> "Content-Length: 1176\r\n"
|
13
13
|
-> "\r\n"
|
14
14
|
reading 1176 bytes...
|
15
|
-
-> "{\"id\":\"PAY-
|
15
|
+
-> "{\"id\":\"PAY-6R435442DX602315LKHGBRSA\",\"create_time\":\"2013-06-27T10:49:44Z\",\"update_time\":\"2013-06-27T10:49:47Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"7.47\"}},\"related_resources\":[{\"sale\":{\"id\":\"08G45707W1331934G\",\"create_time\":\"2013-06-27T10:49:44Z\",\"update_time\":\"2013-06-27T10:49:47Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-6R435442DX602315LKHGBRSA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/08G45707W1331934G\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/08G45707W1331934G/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-6R435442DX602315LKHGBRSA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-6R435442DX602315LKHGBRSA\",\"rel\":\"self\",\"method\":\"GET\"}]}"
|
16
16
|
read 1176 bytes
|
17
17
|
Conn keep-alive
|
18
18
|
opening connection to api.sandbox.paypal.com:443...
|
19
19
|
opened
|
20
20
|
starting SSL for api.sandbox.paypal.com:443...
|
21
21
|
SSL established
|
22
|
-
<- "GET /v1/payments/payment?count=10 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
22
|
+
<- "GET /v1/payments/payment?count=10 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer Osw2KQ0OeYElPQAtMeRH7b5Q7l-qh.xjSd7hQSOwib8\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.5 (paypal-sdk-core 0.2.5; ruby 2.0.0p0-x86_64-darwin12.3.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\n\r\n"
|
23
23
|
-> "HTTP/1.1 200 OK\r\n"
|
24
24
|
-> "Server: Apache-Coyote/1.1\r\n"
|
25
|
-
-> "Date:
|
26
|
-
-> "PayPal-Debug-Id:
|
25
|
+
-> "Date: Thu, 27 Jun 2013 10:49:53 GMT\r\n"
|
26
|
+
-> "PayPal-Debug-Id: 28b616ef0015a\r\n"
|
27
27
|
-> "Content-Type: application/json\r\n"
|
28
28
|
-> "Transfer-Encoding: chunked\r\n"
|
29
29
|
-> "\r\n"
|
30
30
|
-> "2000\r\n"
|
31
31
|
reading 8192 bytes...
|
32
|
-
-> "{\"payments\":[{\"id\":\"PAY-
|
32
|
+
-> "{\"payments\":[{\"id\":\"PAY-6R435442DX602315LKHGBRSA\",\"create_time\":\"2013-06-27T10:49:44Z\",\"update_time\":\"2013-06-27T10:49:47Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"7.47\"}},\"related_resources\":[{\"sale\":{\"id\":\"08G45707W1331934G\",\"create_time\":\"2013-06-27T10:49:44Z\",\"update_time\":\"2013-06-27T10:49:47Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-6R435442DX602315LKHGBRSA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/08G45707W1331934G\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/08G45707W1331934G/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-6R435442DX602315LKHGBRSA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-6R435442DX602315LKHGBRSA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-7PD39680C9122543SKHGBPRA\",\"create_time\":\"2013-06-27T10:45:24Z\",\"update_time\":\"2013-06-27T10:45:28Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"billing_address\":{\"line1\":\"52 N Main ST\",\"city\":\"Johnstown\",\"state\":\"OH\",\"postal_code\":\"43210\",\"country_code\":\"US\"}}}]},\"transactions\":[{\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"5.00\",\"tax\":\"1.00\",\"shipping\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"related_resources\":[{\"sale\":{\"id\":\"2GJ76156TA988933J\",\"create_time\":\"2013-06-27T10:45:24Z\",\"update_time\":\"2013-06-27T10:45:28Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-7PD39680C9122543SKHGBPRA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/2GJ76156TA988933J\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/2GJ76156TA988933J/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-7PD39680C9122543SKHGBPRA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-7PD39680C9122543SKHGBPRA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-22515132VH274140GKHGBPQA\",\"create_time\":\"2013-06-27T10:45:20Z\",\"update_time\":\"2013-06-27T10:45:24Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"billing_address\":{\"line1\":\"52 N Main ST\",\"city\":\"Johnstown\",\"state\":\"OH\",\"postal_code\":\"43210\",\"country_code\":\"US\"}}}]},\"transactions\":[{\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"5.00\",\"tax\":\"1.00\",\"shipping\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"related_resources\":[{\"sale\":{\"id\":\"09T93827PG559415A\",\"create_time\":\"2013-06-27T10:45:20Z\",\"update_time\":\"2013-06-27T10:45:24Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-22515132VH274140GKHGBPQA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/09T93827PG559415A\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/09T93827PG559415A/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-22515132VH274140GKHGBPQA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-22515132VH274140GKHGBPQA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-5K936359MK810191GKHGBPPA\",\"create_time\":\"2013-06-27T10:45:16Z\",\"update_time\":\"2013-06-27T10:45:21Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"billing_address\":{\"line1\":\"52 N Main ST\",\"city\":\"Johnstown\",\"state\":\"OH\",\"postal_code\":\"43210\",\"country_code\":\"US\"}}}]},\"transactions\":[{\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"5.00\",\"tax\":\"1.00\",\"shipping\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"related_resources\":[{\"sale\":{\"id\":\"9EH93163B3020071R\",\"create_time\":\"2013-06-27T10:45:17Z\",\"update_time\":\"2013-06-27T10:45:21Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-5K936359MK810191GKHGBPPA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/9EH93163B3020071R\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/9EH93163B3020071R/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5K936359MK810191GKHGBPPA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5K936359MK810191GKHGBPPA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-7PP823390X6821541KHGBLOA\",\"create_time\":\"2013-06-27T10:36:40Z\",\"update_time\":\"2013-06-27T10:36:43Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"7.47\"}},\"related_resources\":[{\"sale\":{\"id\":\"39331137VY325843E\",\"create_time\":\"2013-06-27T10:36:40Z\",\"update_time\":\"2013-06-27T10:36:43Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-7PP823390X6821541KHGBLOA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/39331137VY325843E\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/39331137VY325843E/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-7PP823390X6821541KHGBLOA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-7PP823390X6821541KHGBLOA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-2YJ70530VD763064EKHGBLNA\",\"create_time\":\"2013-06-27T10:36:36Z\",\"update_time\":\"2013-06-27T10:36:47Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"7.47\"}},\"related_resources\":[{\"sale\":{\"id\":\"618561790K762980R\",\"create_time\":\"2013-06-27T10:36:36Z\",\"update_time\":\"2013-06-27T10:36:47Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-2YJ70530VD763064EKHGBLNA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/618561790K762980R\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/618561790K762980R/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-2YJ70530VD763064EKHGBLNA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-2YJ70530VD763064EKHGBLNA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-6YY86361R9880232RKHGBLGA\",\"create_time\":\"2013-06-27T10:36:08Z\",\"update_time\":\"2013-06-27T10:36:18Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"7.47\"}},\"related_resources\":[{\"sale\":{\"id\":\"87Y07698L80"
|
33
33
|
read 8192 bytes
|
34
34
|
reading 2 bytes...
|
35
35
|
-> "\r\n"
|
36
36
|
read 2 bytes
|
37
|
-
-> "
|
38
|
-
reading
|
39
|
-
-> "
|
40
|
-
-> "
|
41
|
-
read
|
37
|
+
-> "118f\r\n"
|
38
|
+
reading 4495 bytes...
|
39
|
+
-> "11580Y\",\"create_time\":\"2013-06-27T10:36:08Z\",\"update_time\":\"2013-06-27T10:36:18Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-6YY86361R9880232RKHGBLGA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/87Y07698L8011580Y\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/87Y07698L8011580Y/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-6YY86361R9880232RKHGBLGA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/p"
|
40
|
+
-> "ayment/PAY-6YY86361R9880232RKHGBLGA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-42M481275G922871RKHGBLBI\",\"create_time\":\"2013-06-27T10:35:49Z\",\"update_time\":\"2013-06-27T10:35:52Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"7.47\"}},\"related_resources\":[{\"sale\":{\"id\":\"1YA69791VT797374Y\",\"create_time\":\"2013-06-27T10:35:49Z\",\"update_time\":\"2013-06-27T10:35:52Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-42M481275G922871RKHGBLBI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1YA69791VT797374Y\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1YA69791VT797374Y/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-42M481275G922871RKHGBLBI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-42M481275G922871RKHGBLBI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-0WJ66480WL8629433KHGBLAA\",\"create_time\":\"2013-06-27T10:35:44Z\",\"update_time\":\"2013-06-27T10:35:47Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"7.47\"}},\"related_resources\":[{\"sale\":{\"id\":\"0JY12013S10208212\",\"create_time\":\"2013-06-27T10:35:44Z\",\"update_time\":\"2013-06-27T10:35:47Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-0WJ66480WL8629433KHGBLAA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0JY12013S10208212\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0JY12013S10208212/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0WJ66480WL8629433KHGBLAA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0WJ66480WL8629433KHGBLAA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-5RD87290YJ9215428KHGBBPA\",\"create_time\":\"2013-06-27T10:15:24Z\",\"update_time\":\"2013-06-27T10:15:47Z\",\"state\":\"approved\",\"intent\":\"authorize\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx4242\",\"expire_month\":\"8\",\"expire_year\":\"2014\",\"first_name\":\"Bob\",\"last_name\":\"Bobsen\"}}]},\"transactions\":[{\"amount\":{\"total\":\"10.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"10.00\"}},\"related_resources\":[{\"authorization\":{\"id\":\"3J36875921801272L\",\"create_time\":\"2013-06-27T10:15:24Z\",\"update_time\":\"2013-06-27T10:15:47Z\",\"state\":\"authorized\",\"amount\":{\"total\":\"10.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"10.00\"}},\"parent_payment\":\"PAY-5RD87290YJ9215428KHGBBPA\",\"valid_until\":\"2013-07-26T10:15:24Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/3J36875921801272L\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/3J36875921801272L/capture\",\"rel\":\"capture\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/3J36875921801272L/void\",\"rel\":\"void\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5RD87290YJ9215428KHGBBPA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5RD87290YJ9215428KHGBBPA\",\"rel\":\"self\",\"method\":\"GET\"}]}],\"count\":10,\"next_id\":\"PAY-518680051W174184RKHGBBHI\"}"
|
41
|
+
read 4495 bytes
|
42
42
|
reading 2 bytes...
|
43
43
|
-> "\r\n"
|
44
44
|
read 2 bytes
|
@@ -49,67 +49,67 @@ opening connection to api.sandbox.paypal.com:443...
|
|
49
49
|
opened
|
50
50
|
starting SSL for api.sandbox.paypal.com:443...
|
51
51
|
SSL established
|
52
|
-
<- "POST /v1/vault/credit-card HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
52
|
+
<- "POST /v1/vault/credit-card HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer Qonrr9ZAKBIPK9xMfZQwRS85Qbg7aYkMCJBBe0jcuQU\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.5 (paypal-sdk-core 0.2.5; ruby 2.0.0p0-x86_64-darwin12.3.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\nContent-Length: 138\r\n\r\n"
|
53
53
|
<- "{\"type\":\"visa\",\"number\":\"4111111111111111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"cvv2\":\"874\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}"
|
54
54
|
-> "HTTP/1.1 201 Created\r\n"
|
55
55
|
-> "Server: Apache-Coyote/1.1\r\n"
|
56
|
-
-> "Date:
|
57
|
-
-> "PayPal-Debug-Id:
|
56
|
+
-> "Date: Thu, 27 Jun 2013 10:49:58 GMT\r\n"
|
57
|
+
-> "PayPal-Debug-Id: 34d470281e387\r\n"
|
58
58
|
-> "Content-Type: application/json\r\n"
|
59
|
-
-> "Content-Length:
|
59
|
+
-> "Content-Length: 469\r\n"
|
60
60
|
-> "\r\n"
|
61
|
-
reading
|
62
|
-
-> "{\"id\":\"CARD-
|
63
|
-
read
|
61
|
+
reading 469 bytes...
|
62
|
+
-> "{\"id\":\"CARD-0PW70831N6509050PKHGBRVQ\",\"valid_until\":\"2016-06-26T00:00:00Z\",\"state\":\"ok\",\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx1111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-0PW70831N6509050PKHGBRVQ\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-0PW70831N6509050PKHGBRVQ\",\"rel\":\"delete\",\"method\":\"DELETE\"}]}"
|
63
|
+
read 469 bytes
|
64
64
|
Conn keep-alive
|
65
65
|
opening connection to api.sandbox.paypal.com:443...
|
66
66
|
opened
|
67
67
|
starting SSL for api.sandbox.paypal.com:443...
|
68
68
|
SSL established
|
69
|
-
<- "GET /v1/vault/credit-card/CARD-
|
69
|
+
<- "GET /v1/vault/credit-card/CARD-0PW70831N6509050PKHGBRVQ HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer Qonrr9ZAKBIPK9xMfZQwRS85Qbg7aYkMCJBBe0jcuQU\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.5 (paypal-sdk-core 0.2.5; ruby 2.0.0p0-x86_64-darwin12.3.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\n\r\n"
|
70
70
|
-> "HTTP/1.1 200 OK\r\n"
|
71
71
|
-> "Server: Apache-Coyote/1.1\r\n"
|
72
|
-
-> "Date:
|
73
|
-
-> "PayPal-Debug-Id:
|
72
|
+
-> "Date: Thu, 27 Jun 2013 10:49:59 GMT\r\n"
|
73
|
+
-> "PayPal-Debug-Id: ec22a5e91d773\r\n"
|
74
74
|
-> "Content-Type: application/json\r\n"
|
75
|
-
-> "Content-Length:
|
75
|
+
-> "Content-Length: 469\r\n"
|
76
76
|
-> "\r\n"
|
77
|
-
reading
|
78
|
-
-> "{\"id\":\"CARD-
|
79
|
-
read
|
77
|
+
reading 469 bytes...
|
78
|
+
-> "{\"id\":\"CARD-0PW70831N6509050PKHGBRVQ\",\"valid_until\":\"2016-06-26T00:00:00Z\",\"state\":\"ok\",\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx1111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-0PW70831N6509050PKHGBRVQ\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-0PW70831N6509050PKHGBRVQ\",\"rel\":\"delete\",\"method\":\"DELETE\"}]}"
|
79
|
+
read 469 bytes
|
80
80
|
Conn keep-alive
|
81
81
|
opening connection to api.sandbox.paypal.com:443...
|
82
82
|
opened
|
83
83
|
starting SSL for api.sandbox.paypal.com:443...
|
84
84
|
SSL established
|
85
|
-
<- "GET /v1/payments/payment/PAY-1234 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
85
|
+
<- "GET /v1/payments/payment/PAY-1234 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer Osw2KQ0OeYElPQAtMeRH7b5Q7l-qh.xjSd7hQSOwib8\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.5 (paypal-sdk-core 0.2.5; ruby 2.0.0p0-x86_64-darwin12.3.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\n\r\n"
|
86
86
|
-> "HTTP/1.1 404 Not Found\r\n"
|
87
87
|
-> "Server: Apache-Coyote/1.1\r\n"
|
88
|
-
-> "Date:
|
89
|
-
-> "PayPal-Debug-Id:
|
88
|
+
-> "Date: Thu, 27 Jun 2013 10:50:01 GMT\r\n"
|
89
|
+
-> "PayPal-Debug-Id: 9b82e21b1d168\r\n"
|
90
90
|
-> "Content-Type: application/json\r\n"
|
91
|
-
-> "Content-Length:
|
91
|
+
-> "Content-Length: 207\r\n"
|
92
92
|
-> "\r\n"
|
93
|
-
reading
|
94
|
-
-> "{\"name\":\"INVALID_RESOURCE_ID\",\"message\":\"The requested resource ID was not found\",\"information_link\":\"https://developer.paypal.com/docs/api/#INVALID_RESOURCE_ID\",\"debug_id\":\"
|
95
|
-
read
|
93
|
+
reading 207 bytes...
|
94
|
+
-> "{\"name\":\"INVALID_RESOURCE_ID\",\"message\":\"The requested resource ID was not found\",\"information_link\":\"https://developer.paypal.com/webapps/developer/docs/api/#INVALID_RESOURCE_ID\",\"debug_id\":\"9b82e21b1d168\"}"
|
95
|
+
read 207 bytes
|
96
96
|
Conn keep-alive
|
97
97
|
opening connection to api.sandbox.paypal.com:443...
|
98
98
|
opened
|
99
99
|
starting SSL for api.sandbox.paypal.com:443...
|
100
100
|
SSL established
|
101
|
-
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
101
|
+
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer Osw2KQ0OeYElPQAtMeRH7b5Q7l-qh.xjSd7hQSOwib8\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.5 (paypal-sdk-core 0.2.5; ruby 2.0.0p0-x86_64-darwin12.3.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\nContent-Length: 2\r\n\r\n"
|
102
102
|
<- "{}"
|
103
103
|
-> "HTTP/1.1 400 Bad Request\r\n"
|
104
104
|
-> "Server: Apache-Coyote/1.1\r\n"
|
105
|
-
-> "Date:
|
105
|
+
-> "Date: Thu, 27 Jun 2013 10:50:02 GMT\r\n"
|
106
106
|
-> "Connection: close\r\n"
|
107
|
-
-> "PayPal-Debug-Id:
|
107
|
+
-> "PayPal-Debug-Id: f2db159e1f6ba\r\n"
|
108
108
|
-> "Content-Type: application/json\r\n"
|
109
|
-
-> "Content-Length:
|
109
|
+
-> "Content-Length: 364\r\n"
|
110
110
|
-> "Connection: close\r\n"
|
111
111
|
-> "\r\n"
|
112
|
-
reading
|
113
|
-
-> "{\"name\":\"VALIDATION_ERROR\",\"details\":[{\"field\":\"
|
114
|
-
read
|
112
|
+
reading 364 bytes...
|
113
|
+
-> "{\"name\":\"VALIDATION_ERROR\",\"details\":[{\"field\":\"payer\",\"issue\":\"Required field missing\"},{\"field\":\"transactions\",\"issue\":\"Required field missing\"},{\"field\":\"intent\",\"issue\":\"Required field missing\"}],\"message\":\"Invalid request - see details\",\"information_link\":\"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR\",\"debug_id\":\"f2db159e1f6ba\"}"
|
114
|
+
read 364 bytes
|
115
115
|
Conn close
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paypal-sdk-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayPal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|