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: 5a5e93acb63e16d36e56660442ca46eb474a6362
4
- data.tar.gz: 94d2cb6fe227035aa65655d085e6d3be3fa1ab94
3
+ metadata.gz: 3ae30ef01b809a2b34d440a5799a3f064aab1147
4
+ data.tar.gz: 1d809f538b42ebdaafcaabcf73eea8087cf435f2
5
5
  SHA512:
6
- metadata.gz: 7cc7d4662f32aa114c64ba3596f907e98e3248100339a0796e420a84d9317fd952e6e9489b5abd42616bbd45f53f7079fb967864ef1a79c8716193473ab1e15f
7
- data.tar.gz: 31e0571cba2427ba27b98b324983b2346a4a90123701e068a1915a43d07b6e8ff556f927408ac50bb9436d44860fed5c8f6cbb6462c192d908577307074074b7
6
+ metadata.gz: 2dc5687b41463349af976f353bc66e88dca8234be5b9ddadb95d98220887a4206dc4511437c302a2ec77afdcf30c906157d1b9714dfded9ed042a684bcb7a27a
7
+ data.tar.gz: 7858faa628589329cd1d898a901b7aa9d1588a700543ea701ca015edf9459f17f72d8680fa11609bc2bd81d16d8d1067b99dbecaec4c2c9ff8466678e0b9c806
data/CHANGELOG.txt CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.2.5 - Jun 27, 2013
2
+ - Fix DateTime parser to support 0
3
+ - Set content-type header for generate-token REST API
4
+
1
5
  Version 0.2.4 - May 29, 2013
2
6
  - Support HTTP DELETE method
3
7
 
@@ -41,6 +41,7 @@ module PayPal::SDK::Core
41
41
 
42
42
  class DateTime < ::DateTime
43
43
  def self.new(date_time)
44
+ date_time = "0001-01-01T00:00:00" if date_time.to_s == "0"
44
45
  date_time.is_a?(::DateTime) ? date_time : parse(date_time.to_s)
45
46
  end
46
47
  end
@@ -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( "Authorization" => "Basic #{basic_auth}" )
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
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module Core
4
- VERSION = "0.2.4"
4
+ VERSION = "0.2.5"
5
5
  end
6
6
  end
7
7
  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
 
@@ -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 pr6P5VCVJBWctQrwgmtzS4RhLv9LEGLupZFCazFv8Rk\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.4 (paypal-sdk-core 0.2.4; 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"
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: Wed, 29 May 2013 16:35:18 GMT\r\n"
10
- -> "PayPal-Debug-Id: af7c799944028\r\n"
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-4V566961KD6863226KGTC4QY\",\"create_time\":\"2013-05-29T16:35:15Z\",\"update_time\":\"2013-05-29T16:35: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\":\"7F906919K3645391T\",\"create_time\":\"2013-05-29T16:35:15Z\",\"update_time\":\"2013-05-29T16:35:18Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-4V566961KD6863226KGTC4QY\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/7F906919K3645391T\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/7F906919K3645391T/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-4V566961KD6863226KGTC4QY\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-4V566961KD6863226KGTC4QY\",\"rel\":\"self\",\"method\":\"GET\"}]}"
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 pr6P5VCVJBWctQrwgmtzS4RhLv9LEGLupZFCazFv8Rk\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.4 (paypal-sdk-core 0.2.4; 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"
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: Wed, 29 May 2013 16:35:22 GMT\r\n"
26
- -> "PayPal-Debug-Id: 3cc5554543d04\r\n"
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-4V566961KD6863226KGTC4QY\",\"create_time\":\"2013-05-29T16:35:15Z\",\"update_time\":\"2013-05-29T16:35: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\":\"7F906919K3645391T\",\"create_time\":\"2013-05-29T16:35:15Z\",\"update_time\":\"2013-05-29T16:35:18Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-4V566961KD6863226KGTC4QY\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/7F906919K3645391T\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/7F906919K3645391T/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-4V566961KD6863226KGTC4QY\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-4V566961KD6863226KGTC4QY\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-81764150P9204300KKGTC4KY\",\"create_time\":\"2013-05-29T16:34:51Z\",\"update_time\":\"2013-05-29T16:34:51Z\",\"state\":\"created\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"paypal\"},\"transactions\":[{\"amount\":{\"total\":\"100.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"75.00\",\"tax\":\"15.00\",\"shipping\":\"10.00\"}},\"description\":\"Transaction description.\"}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-81764150P9204300KKGTC4KY\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-3XP069827X693404T\",\"rel\":\"approval_url\",\"method\":\"REDIRECT\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-81764150P9204300KKGTC4KY/execute\",\"rel\":\"execute\",\"method\":\"POST\"}]},{\"id\":\"PAY-24B12231TM861715XKGTC3CQ\",\"create_time\":\"2013-05-29T16:32:10Z\",\"update_time\":\"2013-05-29T16:32:13Z\",\"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\":\"3TJ42157E24040313\",\"create_time\":\"2013-05-29T16:32:10Z\",\"update_time\":\"2013-05-29T16:32:13Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-24B12231TM861715XKGTC3CQ\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/3TJ42157E24040313\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/3TJ42157E24040313/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-24B12231TM861715XKGTC3CQ\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-24B12231TM861715XKGTC3CQ\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-6XJ14222FL8087926KGTCSUA\",\"create_time\":\"2013-05-29T16:14:08Z\",\"update_time\":\"2013-05-29T16:14:10Z\",\"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\":\"1H274673DP037103E\",\"create_time\":\"2013-05-29T16:14:08Z\",\"update_time\":\"2013-05-29T16:14:10Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-6XJ14222FL8087926KGTCSUA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1H274673DP037103E\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1H274673DP037103E/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-6XJ14222FL8087926KGTCSUA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-6XJ14222FL8087926KGTCSUA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-4RU51688KK3768204KGTCPAI\",\"create_time\":\"2013-05-29T16:06:25Z\",\"update_time\":\"2013-05-29T16:06:32Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2019\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"billing_address\":{\"line1\":\"3909 Witmer Road\",\"line2\":\"Niagara Falls\",\"city\":\"Niagara Falls\",\"state\":\"NY\",\"postal_code\":\"14305\",\"country_code\":\"UK\",\"phone\":\"716-298-1822\"}}}]},\"transactions\":[{\"amount\":{\"total\":\"2.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"2.00\"}},\"description\":\"This is the payment description.\",\"related_resources\":[{\"sale\":{\"id\":\"7HA76075V26737635\",\"create_time\":\"2013-05-29T16:06:25Z\",\"update_time\":\"2013-05-29T16:06:32Z\",\"state\":\"completed\",\"amount\":{\"total\":\"2.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-4RU51688KK3768204KGTCPAI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/7HA76075V26737635\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/7HA76075V26737635/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-4RU51688KK3768204KGTCPAI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-4RU51688KK3768204KGTCPAI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-9V506785ME366553PKGTCODY\",\"create_time\":\"2013-05-29T16:04:31Z\",\"update_time\":\"2013-05-29T16:04:34Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2019\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"billing_address\":{\"line1\":\"3909 Witmer Road\",\"line2\":\"Niagara Falls\",\"city\":\"Niagara Falls\",\"state\":\"NY\",\"postal_code\":\"14305\",\"country_code\":\"UK\",\"phone\":\"716-298-1822\"}}}]},\"transactions\":[{\"amount\":{\"total\":\"2.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"2.00\"}},\"description\":\"This is the payment description.\",\"related_resources\":[{\"sale\":{\"id\":\"9UT54249T0218763E\",\"create_time\":\"2013-05-29T16:04:31Z\",\"update_time\":\"2013-05-29T16:04:34Z\",\"state\":\"completed\",\"amount\":{\"total\":\"2.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-9V506785ME366553PKGTCODY\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/9UT54249T0218763E\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/9UT54249T0218763E/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-9V506785ME366553PKGTCODY\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-9V506785ME366553PKGTCODY\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-2N3878544N6319625KGTCN2A\",\"create_time\":\"2013-05-29T16:03:52Z\",\"update_time\":\"2013-05-29T16:03:55Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2019\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"billing_address\":{\"line1\":\"3909 Witmer Road\",\"line2\":\"Niagara Falls\",\"city\":\"Niagara Falls\",\"state\":\"NY\",\"postal_code\":\"14305\",\"country_code\":\"UK\",\"phone\":\"716-298-1822\"}}}]},\"transactions\":[{\"amount\":{\"total\":\"2.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"2.00\"}},\"description\":\"This is the payment description.\",\"related_resources\":[{\"sale\":{\"id\":\"2LY07684WB187020E\",\"create_time\":\"2013-05-29T16:03:52Z\",\"update_time\":\"2013-05-29T16:03:55Z\",\"state\":\"completed\",\"amount\":{\"total\":\"2.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-2N38785"
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
- -> "ff0\r\n"
38
- reading 4080 bytes...
39
- -> "44N6319625KGTCN2A\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/2LY07684WB187020E\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/2LY07684WB187020E/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-2N3878544N6319625KGTCN2A\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-2N3878544N6319625KGTCN2A\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-2C7866858C8978021KGTCMCQ\",\"create_time\":\"2013-05-29T16:00:10Z\",\"update_time\":\"2013-05-29T16:00:1"
40
- -> "3Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx0331\",\"expire_month\":\"11\",\"expire_year\":\"2019\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"billing_address\":{\"line1\":\"3909 Witmer Road\",\"line2\":\"Niagara Falls\",\"city\":\"Niagara Falls\",\"state\":\"NY\",\"postal_code\":\"14305\",\"country_code\":\"US\",\"phone\":\"716-298-1822\"}}}]},\"transactions\":[{\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment description.\",\"related_resources\":[{\"sale\":{\"id\":\"6V412438HX5375506\",\"create_time\":\"2013-05-29T16:00:10Z\",\"update_time\":\"2013-05-29T16:00:13Z\",\"state\":\"completed\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-2C7866858C8978021KGTCMCQ\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/6V412438HX5375506\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/6V412438HX5375506/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-2C7866858C8978021KGTCMCQ\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-2C7866858C8978021KGTCMCQ\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-76745787G08902613KGTCL3Q\",\"create_time\":\"2013-05-29T15:59:42Z\",\"update_time\":\"2013-05-29T15:59:49Z\",\"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\":\"3U469105VW698144U\",\"create_time\":\"2013-05-29T15:59:42Z\",\"update_time\":\"2013-05-29T15:59:49Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-76745787G08902613KGTCL3Q\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/3U469105VW698144U\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/3U469105VW698144U/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-76745787G08902613KGTCL3Q\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-76745787G08902613KGTCL3Q\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-17P71880FU411491DKGTCLYA\",\"create_time\":\"2013-05-29T15:59:28Z\",\"update_time\":\"2013-05-29T15:59:28Z\",\"state\":\"created\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"paypal\"},\"transactions\":[{\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment description.\"}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-17P71880FU411491DKGTCLYA\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-7S6967144W139933M\",\"rel\":\"approval_url\",\"method\":\"REDIRECT\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-17P71880FU411491DKGTCLYA/execute\",\"rel\":\"execute\",\"method\":\"POST\"}]}],\"count\":10,\"next_id\":\"PAY-73C66341BN170503RKGTCKSY\"}"
41
- read 4080 bytes
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 7pqAf0OIZ4PxjJ5XBIzpl0Hm2OyyCfmzrr5MupZHbIo\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.4 (paypal-sdk-core 0.2.4; 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"
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: Wed, 29 May 2013 16:35:28 GMT\r\n"
57
- -> "PayPal-Debug-Id: 536da2314133a\r\n"
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: 347\r\n"
59
+ -> "Content-Length: 469\r\n"
60
60
  -> "\r\n"
61
- reading 347 bytes...
62
- -> "{\"id\":\"CARD-8TJ30121FL751553XKGTC4TY\",\"valid_until\":\"2016-05-28T00:00:00.000Z\",\"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-8TJ30121FL751553XKGTC4TY\",\"rel\":\"self\",\"method\":\"GET\"}]}"
63
- read 347 bytes
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-8TJ30121FL751553XKGTC4TY HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer 7pqAf0OIZ4PxjJ5XBIzpl0Hm2OyyCfmzrr5MupZHbIo\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.4 (paypal-sdk-core 0.2.4; 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"
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: Wed, 29 May 2013 16:35:30 GMT\r\n"
73
- -> "PayPal-Debug-Id: e68314ca41aa7\r\n"
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: 347\r\n"
75
+ -> "Content-Length: 469\r\n"
76
76
  -> "\r\n"
77
- reading 347 bytes...
78
- -> "{\"id\":\"CARD-8TJ30121FL751553XKGTC4TY\",\"valid_until\":\"2016-05-28T00:00:00.000Z\",\"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-8TJ30121FL751553XKGTC4TY\",\"rel\":\"self\",\"method\":\"GET\"}]}"
79
- read 347 bytes
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 pr6P5VCVJBWctQrwgmtzS4RhLv9LEGLupZFCazFv8Rk\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.4 (paypal-sdk-core 0.2.4; 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"
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: Wed, 29 May 2013 16:35:31 GMT\r\n"
89
- -> "PayPal-Debug-Id: b762004140393\r\n"
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: 189\r\n"
91
+ -> "Content-Length: 207\r\n"
92
92
  -> "\r\n"
93
- reading 189 bytes...
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\":\"b762004140393\"}"
95
- read 189 bytes
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 pr6P5VCVJBWctQrwgmtzS4RhLv9LEGLupZFCazFv8Rk\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.4 (paypal-sdk-core 0.2.4; 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"
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: Wed, 29 May 2013 16:35:33 GMT\r\n"
105
+ -> "Date: Thu, 27 Jun 2013 10:50:02 GMT\r\n"
106
106
  -> "Connection: close\r\n"
107
- -> "PayPal-Debug-Id: 3f783f1640893\r\n"
107
+ -> "PayPal-Debug-Id: f2db159e1f6ba\r\n"
108
108
  -> "Content-Type: application/json\r\n"
109
- -> "Content-Length: 346\r\n"
109
+ -> "Content-Length: 364\r\n"
110
110
  -> "Connection: close\r\n"
111
111
  -> "\r\n"
112
- reading 346 bytes...
113
- -> "{\"name\":\"VALIDATION_ERROR\",\"details\":[{\"field\":\"transactions\",\"issue\":\"Required field missing\"},{\"field\":\"payer\",\"issue\":\"Required field missing\"},{\"field\":\"intent\",\"issue\":\"Required field missing\"}],\"message\":\"Invalid request - see details\",\"information_link\":\"https://developer.paypal.com/docs/api/#VALIDATION_ERROR\",\"debug_id\":\"3f783f1640893\"}"
114
- read 346 bytes
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
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-05-29 00:00:00.000000000 Z
11
+ date: 2013-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xml-simple