paypal-sdk-core 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +3 -0
- data/lib/paypal-sdk/core/exceptions.rb +7 -2
- data/lib/paypal-sdk/core/version.rb +1 -1
- data/spec/log/rest_http.log +51 -51
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05d5a81202fabd84e264273eea2585c5f82a3604
|
4
|
+
data.tar.gz: 71696cfb8f664a3aa9562426e21d81442e422750
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df8a2f389ad1abc0d85bab0bd5bdf3977bf7c97bfc4fd2af9fa6250fcec629adc39b5f7c2edfa172cc808544b2ad9eb3ee2da1bbd86523746060f233045f1989
|
7
|
+
data.tar.gz: 8eb28885b54dac9526f6bb51b21ed52e3af3fe8dbe2b43652736fd97eedc68d5749f64577526021cb9c237450b6c05310534506d80d1f77589abd292b25cffe5
|
data/CHANGELOG.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'pp'
|
3
|
+
|
1
4
|
module PayPal::SDK::Core
|
2
5
|
module Exceptions
|
3
6
|
class ConnectionError < StandardError # :nodoc:
|
@@ -9,11 +12,13 @@ module PayPal::SDK::Core
|
|
9
12
|
end
|
10
13
|
|
11
14
|
def to_s
|
15
|
+
response_body = JSON.parse(response.body)
|
16
|
+
debug_id = response_body["debug_id"]
|
12
17
|
message = "Failed."
|
13
18
|
message << " Response code = #{response.code}." if response.respond_to?(:code)
|
14
19
|
message << " Response message = #{response.message}." if response.respond_to?(:message)
|
15
|
-
message << " Response debug ID = #{
|
16
|
-
|
20
|
+
message << " Response debug ID = #{debug_id}." if debug_id
|
21
|
+
message
|
17
22
|
end
|
18
23
|
end
|
19
24
|
|
data/spec/log/rest_http.log
CHANGED
@@ -2,22 +2,22 @@ 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 A015i3t8ei9F.wNyHZRs7RePr0Ofsl2n1G1Z6BpZL4.Dh0A\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.9 (paypal-sdk-core 0.2.9; ruby 2.1.2p95-x86_64-darwin13.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
|
-
-> "PROXY_SERVER_INFO: host=
|
10
|
-
-> "Paypal-Debug-Id:
|
11
|
-
-> "SERVER_INFO: paymentsplatformserv:v1.payments.payment&CalThreadId=
|
12
|
-
-> "CORRELATION-ID:
|
9
|
+
-> "PROXY_SERVER_INFO: host=slcsbjava1.slc.paypal.com;threadId=771511\r\n"
|
10
|
+
-> "Paypal-Debug-Id: 78a3faee8bd24\r\n"
|
11
|
+
-> "SERVER_INFO: paymentsplatformserv:v1.payments.payment&CalThreadId=58176&TopLevelTxnStartTime=146d441e9b9&Host=slcsbjm3.slc.paypal.com&pid=30707\r\n"
|
12
|
+
-> "CORRELATION-ID: 78a3faee8bd24\r\n"
|
13
13
|
-> "Content-Language: *\r\n"
|
14
|
-
-> "Date:
|
14
|
+
-> "Date: Wed, 25 Jun 2014 18:20:46 GMT\r\n"
|
15
15
|
-> "Content-Type: application/json\r\n"
|
16
16
|
-> "Transfer-Encoding: chunked\r\n"
|
17
17
|
-> "\r\n"
|
18
18
|
-> "498\r\n"
|
19
19
|
reading 1176 bytes...
|
20
|
-
-> "{\"id\":\"PAY-
|
20
|
+
-> "{\"id\":\"PAY-3MV24157GS7613613KOVRF3A\",\"create_time\":\"2014-06-25T18:20:28Z\",\"update_time\":\"2014-06-25T18:20:46Z\",\"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\":\"89M10973YV6618001\",\"create_time\":\"2014-06-25T18:20:28Z\",\"update_time\":\"2014-06-25T18:20:46Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-3MV24157GS7613613KOVRF3A\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/89M10973YV6618001\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/89M10973YV6618001/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3MV24157GS7613613KOVRF3A\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3MV24157GS7613613KOVRF3A\",\"rel\":\"self\",\"method\":\"GET\"}]}"
|
21
21
|
read 1176 bytes
|
22
22
|
reading 2 bytes...
|
23
23
|
-> "\r\n"
|
@@ -29,30 +29,30 @@ opening connection to api.sandbox.paypal.com:443...
|
|
29
29
|
opened
|
30
30
|
starting SSL for api.sandbox.paypal.com:443...
|
31
31
|
SSL established
|
32
|
-
<- "GET /v1/payments/payment?count=10 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
32
|
+
<- "GET /v1/payments/payment?count=10 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A015i3t8ei9F.wNyHZRs7RePr0Ofsl2n1G1Z6BpZL4.Dh0A\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.9 (paypal-sdk-core 0.2.9; ruby 2.1.2p95-x86_64-darwin13.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"
|
33
33
|
-> "HTTP/1.1 200 OK\r\n"
|
34
34
|
-> "Server: Apache-Coyote/1.1\r\n"
|
35
|
-
-> "PROXY_SERVER_INFO: host=
|
36
|
-
-> "Paypal-Debug-Id:
|
37
|
-
-> "SERVER_INFO: paymentsplatformserv:v1.payments.payment&CalThreadId=
|
38
|
-
-> "CORRELATION-ID:
|
35
|
+
-> "PROXY_SERVER_INFO: host=slcsbjava3.slc.paypal.com;threadId=768254\r\n"
|
36
|
+
-> "Paypal-Debug-Id: 6d3193e6ab5f3\r\n"
|
37
|
+
-> "SERVER_INFO: paymentsplatformserv:v1.payments.payment&CalThreadId=208&TopLevelTxnStartTime=146d44234bc&Host=slcsbjm3.slc.paypal.com&pid=30707\r\n"
|
38
|
+
-> "CORRELATION-ID: 6d3193e6ab5f3\r\n"
|
39
39
|
-> "Content-Language: *\r\n"
|
40
|
-
-> "Date:
|
40
|
+
-> "Date: Wed, 25 Jun 2014 18:20:54 GMT\r\n"
|
41
41
|
-> "Content-Type: application/json\r\n"
|
42
42
|
-> "Transfer-Encoding: chunked\r\n"
|
43
43
|
-> "\r\n"
|
44
44
|
-> "2000\r\n"
|
45
45
|
reading 8192 bytes...
|
46
|
-
-> "{\"payments\":[{\"id\":\"PAY-
|
46
|
+
-> "{\"payments\":[{\"id\":\"PAY-3MV24157GS7613613KOVRF3A\",\"create_time\":\"2014-06-25T18:20:28Z\",\"update_time\":\"2014-06-25T18:20:46Z\",\"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\":\"89M10973YV6618001\",\"create_time\":\"2014-06-25T18:20:28Z\",\"update_time\":\"2014-06-25T18:20:46Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-3MV24157GS7613613KOVRF3A\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/89M10973YV6618001\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/89M10973YV6618001/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3MV24157GS7613613KOVRF3A\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3MV24157GS7613613KOVRF3A\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-8N5392241W792864SKOVRFGQ\",\"create_time\":\"2014-06-25T18:19:06Z\",\"update_time\":\"2014-06-25T18:19: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\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"7.47\"}},\"related_resources\":[{\"sale\":{\"id\":\"1P491365V5989752N\",\"create_time\":\"2014-06-25T18:19:06Z\",\"update_time\":\"2014-06-25T18:19:24Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-8N5392241W792864SKOVRFGQ\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1P491365V5989752N\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1P491365V5989752N/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8N5392241W792864SKOVRFGQ\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8N5392241W792864SKOVRFGQ\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-8VP935958A373003SKOVREMI\",\"create_time\":\"2014-06-25T18:17:21Z\",\"update_time\":\"2014-06-25T18:17:39Z\",\"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\":\"1DT877151X724212T\",\"create_time\":\"2014-06-25T18:17:21Z\",\"update_time\":\"2014-06-25T18:17:39Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-8VP935958A373003SKOVREMI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1DT877151X724212T\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1DT877151X724212T/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8VP935958A373003SKOVREMI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8VP935958A373003SKOVREMI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-5JC81997N4760272VKOVREHI\",\"create_time\":\"2014-06-25T18:17:01Z\",\"update_time\":\"2014-06-25T18:17:05Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx9258\",\"expire_month\":\"3\",\"expire_year\":\"2018\",\"first_name\":\"Mehmet\",\"last_name\":\"TUNG\"}}]},\"transactions\":[{\"amount\":{\"total\":\"41.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"41.00\"}},\"description\":\"This is the payment transaction description.\",\"related_resources\":[{\"sale\":{\"id\":\"1HC10865VX513501U\",\"create_time\":\"2014-06-25T18:17:02Z\",\"update_time\":\"2014-06-25T18:17:05Z\",\"state\":\"completed\",\"amount\":{\"total\":\"41.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-5JC81997N4760272VKOVREHI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1HC10865VX513501U\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1HC10865VX513501U/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5JC81997N4760272VKOVREHI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5JC81997N4760272VKOVREHI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-4S647553R47486647KOVREEI\",\"create_time\":\"2014-06-25T18:16:49Z\",\"update_time\":\"2014-06-25T18:17:08Z\",\"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\":\"3RM69394184915142\",\"create_time\":\"2014-06-25T18:16:49Z\",\"update_time\":\"2014-06-25T18:17:08Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-4S647553R47486647KOVREEI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/3RM69394184915142\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/3RM69394184915142/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-4S647553R47486647KOVREEI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-4S647553R47486647KOVREEI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-10R34207L40484237KOVRDUI\",\"create_time\":\"2014-06-25T18:15:45Z\",\"update_time\":\"2014-06-25T18:16:03Z\",\"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\":\"0SC828806B642234S\",\"create_time\":\"2014-06-25T18:15:45Z\",\"update_time\":\"2014-06-25T18:16:03Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-10R34207L40484237KOVRDUI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0SC828806B642234S\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0SC828806B642234S/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-10R34207L40484237KOVRDUI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-10R34207L40484237KOVRDUI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-7LJ51063P1285520EKOVRDBI\",\"create_time\":\"2014-06-25T18:14:29Z\",\"update_time\":\"2014-06-25T18:14:29Z\",\"state\":\"created\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"paypal\",\"payer_info\":{\"shipping_address\":{}}},\"transactions\":[{\"amount\":{\"total\":\"20.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"20.00\"}},\"description\":\"Pizza 2\"}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-7LJ51063P1285520EKOVRDBI\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-7GD62525N43645237\",\"rel\":\"approval_url\",\"method\":\"REDIRECT\"},{\"href\":\"https://api.sand"
|
47
47
|
read 8192 bytes
|
48
48
|
reading 2 bytes...
|
49
49
|
-> "\r\n"
|
50
50
|
read 2 bytes
|
51
|
-
-> "
|
52
|
-
reading
|
53
|
-
-> "
|
54
|
-
-> "
|
55
|
-
read
|
51
|
+
-> "eb9\r\n"
|
52
|
+
reading 3769 bytes...
|
53
|
+
-> "box.paypal.com/v1/payments/payment/PAY-7LJ51063P1285520EKOVRDBI/execute\",\"rel\":\"execute\",\"method\":\"POST\"}]},{\"id\":\"PAY-5KR71313Y7827302EKOVQ6AI\",\"create_time\":\"2014-06-25T18:03:45Z\",\"update_time\":\"2014-06-25T18:04:28Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"paypal\",\"payer_info\":{\"email\":\"henry7686@gmail.com\",\"first_name\":\"Haoyi\",\"las"
|
54
|
+
-> "t_name\":\"Zhou\",\"payer_id\":\"Q6RM27YWJ8CG2\",\"shipping_address\":{\"line1\":\"1 Main St\",\"city\":\"San Jose\",\"state\":\"CA\",\"postal_code\":\"95131\",\"country_code\":\"US\",\"recipientName\":\"Haoyi Zhou\"}}},\"transactions\":[{\"amount\":{\"total\":\"99.99\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"99.99\"}},\"description\":\"Transaction description.\",\"item_list\":{\"items\":[{\"name\":\"little6\",\"sku\":\"channel\",\"price\":\"99.99\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"sale\":{\"id\":\"6ER21451PY951644X\",\"create_time\":\"2014-06-25T18:03:45Z\",\"update_time\":\"2014-06-25T18:04:28Z\",\"state\":\"completed\",\"amount\":{\"total\":\"99.99\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-5KR71313Y7827302EKOVQ6AI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/6ER21451PY951644X\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/6ER21451PY951644X/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5KR71313Y7827302EKOVQ6AI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5KR71313Y7827302EKOVQ6AI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-6ER14301NC474144VKOVQZ4A\",\"create_time\":\"2014-06-25T17:54:56Z\",\"update_time\":\"2014-06-25T17:54:56Z\",\"state\":\"created\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"paypal\",\"payer_info\":{\"shipping_address\":{}}},\"transactions\":[{\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"5.00\",\"tax\":\"1.00\",\"shipping\":\"1.00\"}},\"description\":\"This is the payment transaction description.\"}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-6ER14301NC474144VKOVQZ4A\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-0PU23726LF535371R\",\"rel\":\"approval_url\",\"method\":\"REDIRECT\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-6ER14301NC474144VKOVQZ4A/execute\",\"rel\":\"execute\",\"method\":\"POST\"}]},{\"id\":\"PAY-5GV4895828429153NKOVQNPI\",\"create_time\":\"2014-06-25T17:28:29Z\",\"update_time\":\"2014-06-25T17:28: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\",\"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\":\"78H85650E3677762S\",\"create_time\":\"2014-06-25T17:28:29Z\",\"update_time\":\"2014-06-25T17:28:47Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-5GV4895828429153NKOVQNPI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/78H85650E3677762S\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/78H85650E3677762S/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5GV4895828429153NKOVQNPI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-5GV4895828429153NKOVQNPI\",\"rel\":\"self\",\"method\":\"GET\"}]}],\"count\":10,\"next_id\":\"PAY-6X929375G6736213TKOVQNJY\"}"
|
55
|
+
read 3769 bytes
|
56
56
|
reading 2 bytes...
|
57
57
|
-> "\r\n"
|
58
58
|
read 2 bytes
|
@@ -63,22 +63,22 @@ opening connection to api.sandbox.paypal.com:443...
|
|
63
63
|
opened
|
64
64
|
starting SSL for api.sandbox.paypal.com:443...
|
65
65
|
SSL established
|
66
|
-
<- "POST /v1/vault/credit-card HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
66
|
+
<- "POST /v1/vault/credit-card HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A015Cfw94VkuveVoOQ7Khqqfi0pR5TMyktF0VbGv-c4h.fo\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.9 (paypal-sdk-core 0.2.9; ruby 2.1.2p95-x86_64-darwin13.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"
|
67
67
|
<- "{\"type\":\"visa\",\"number\":\"4111111111111111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"cvv2\":\"874\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}"
|
68
68
|
-> "HTTP/1.1 201 Created\r\n"
|
69
69
|
-> "Server: Apache-Coyote/1.1\r\n"
|
70
|
-
-> "PROXY_SERVER_INFO: host=
|
71
|
-
-> "Paypal-Debug-Id:
|
70
|
+
-> "PROXY_SERVER_INFO: host=slcsbjava1.slc.paypal.com;threadId=94536\r\n"
|
71
|
+
-> "Paypal-Debug-Id: 25677768b0226\r\n"
|
72
72
|
-> "Content-Language: *\r\n"
|
73
|
-
-> "CORRELATION-ID:
|
74
|
-
-> "Date:
|
75
|
-
-> "SERVER_INFO: vaultplatformserv:v1.vault.credit-card&CalThreadId=
|
73
|
+
-> "CORRELATION-ID: 25677768b0226\r\n"
|
74
|
+
-> "Date: Wed, 25 Jun 2014 18:20:55 GMT\r\n"
|
75
|
+
-> "SERVER_INFO: vaultplatformserv:v1.vault.credit-card&CalThreadId=1855&TopLevelTxnStartTime=146d442568d&Host=slcsbvaultplatformserv502.slc.paypal.com&pid=30900\r\n"
|
76
76
|
-> "Content-Type: application/json\r\n"
|
77
77
|
-> "Transfer-Encoding: chunked\r\n"
|
78
78
|
-> "\r\n"
|
79
79
|
-> "29b\r\n"
|
80
80
|
reading 667 bytes...
|
81
|
-
-> "{\"id\":\"CARD-
|
81
|
+
-> "{\"id\":\"CARD-02A96142SN154942MKOVRGBY\",\"state\":\"ok\",\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx1111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"valid_until\":\"2017-06-24T00:00:00Z\",\"create_time\":\"2014-06-25T18:20:55Z\",\"update_time\":\"2014-06-25T18:20:55Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-02A96142SN154942MKOVRGBY\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-02A96142SN154942MKOVRGBY\",\"rel\":\"delete\",\"method\":\"DELETE\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-02A96142SN154942MKOVRGBY\",\"rel\":\"patch\",\"method\":\"PATCH\"}]}"
|
82
82
|
read 667 bytes
|
83
83
|
reading 2 bytes...
|
84
84
|
-> "\r\n"
|
@@ -90,21 +90,21 @@ opening connection to api.sandbox.paypal.com:443...
|
|
90
90
|
opened
|
91
91
|
starting SSL for api.sandbox.paypal.com:443...
|
92
92
|
SSL established
|
93
|
-
<- "GET /v1/vault/credit-card/CARD-
|
93
|
+
<- "GET /v1/vault/credit-card/CARD-02A96142SN154942MKOVRGBY HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A015Cfw94VkuveVoOQ7Khqqfi0pR5TMyktF0VbGv-c4h.fo\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.9 (paypal-sdk-core 0.2.9; ruby 2.1.2p95-x86_64-darwin13.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"
|
94
94
|
-> "HTTP/1.1 200 OK\r\n"
|
95
95
|
-> "Server: Apache-Coyote/1.1\r\n"
|
96
|
-
-> "PROXY_SERVER_INFO: host=
|
97
|
-
-> "Paypal-Debug-Id:
|
96
|
+
-> "PROXY_SERVER_INFO: host=slcsbjava3.slc.paypal.com;threadId=768254\r\n"
|
97
|
+
-> "Paypal-Debug-Id: 2318ff16ad9bb\r\n"
|
98
98
|
-> "Content-Language: *\r\n"
|
99
|
-
-> "CORRELATION-ID:
|
100
|
-
-> "Date:
|
101
|
-
-> "SERVER_INFO: vaultplatformserv:v1.vault.credit-card&CalThreadId=
|
99
|
+
-> "CORRELATION-ID: 2318ff16ad9bb\r\n"
|
100
|
+
-> "Date: Wed, 25 Jun 2014 18:20:56 GMT\r\n"
|
101
|
+
-> "SERVER_INFO: vaultplatformserv:v1.vault.credit-card&CalThreadId=76399&TopLevelTxnStartTime=146d4425871&Host=slcsbvaultplatformserv501.slc.paypal.com&pid=19516\r\n"
|
102
102
|
-> "Content-Type: application/json\r\n"
|
103
103
|
-> "Transfer-Encoding: chunked\r\n"
|
104
104
|
-> "\r\n"
|
105
105
|
-> "29b\r\n"
|
106
106
|
reading 667 bytes...
|
107
|
-
-> "{\"id\":\"CARD-
|
107
|
+
-> "{\"id\":\"CARD-02A96142SN154942MKOVRGBY\",\"state\":\"ok\",\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx1111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"valid_until\":\"2017-06-24T00:00:00Z\",\"create_time\":\"2014-06-25T18:20:55Z\",\"update_time\":\"2014-06-25T18:20:55Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-02A96142SN154942MKOVRGBY\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-02A96142SN154942MKOVRGBY\",\"rel\":\"delete\",\"method\":\"DELETE\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-02A96142SN154942MKOVRGBY\",\"rel\":\"patch\",\"method\":\"PATCH\"}]}"
|
108
108
|
read 667 bytes
|
109
109
|
reading 2 bytes...
|
110
110
|
-> "\r\n"
|
@@ -116,21 +116,21 @@ opening connection to api.sandbox.paypal.com:443...
|
|
116
116
|
opened
|
117
117
|
starting SSL for api.sandbox.paypal.com:443...
|
118
118
|
SSL established
|
119
|
-
<- "GET /v1/payments/payment/PAY-1234 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
119
|
+
<- "GET /v1/payments/payment/PAY-1234 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A015i3t8ei9F.wNyHZRs7RePr0Ofsl2n1G1Z6BpZL4.Dh0A\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.9 (paypal-sdk-core 0.2.9; ruby 2.1.2p95-x86_64-darwin13.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"
|
120
120
|
-> "HTTP/1.1 404 Not Found\r\n"
|
121
121
|
-> "Server: Apache-Coyote/1.1\r\n"
|
122
|
-
-> "PROXY_SERVER_INFO: host=slcsbjava1.slc.paypal.com;threadId=
|
123
|
-
-> "Paypal-Debug-Id:
|
124
|
-
-> "SERVER_INFO: paymentsplatformserv:v1.payments.payment&CalThreadId=
|
125
|
-
-> "CORRELATION-ID:
|
122
|
+
-> "PROXY_SERVER_INFO: host=slcsbjava1.slc.paypal.com;threadId=14031\r\n"
|
123
|
+
-> "Paypal-Debug-Id: 5b37cf15b0e65\r\n"
|
124
|
+
-> "SERVER_INFO: paymentsplatformserv:v1.payments.payment&CalThreadId=208&TopLevelTxnStartTime=146d4425a71&Host=slcsbjm3.slc.paypal.com&pid=30707\r\n"
|
125
|
+
-> "CORRELATION-ID: 5b37cf15b0e65\r\n"
|
126
126
|
-> "Content-Language: *\r\n"
|
127
|
-
-> "Date:
|
127
|
+
-> "Date: Wed, 25 Jun 2014 18:20:56 GMT\r\n"
|
128
128
|
-> "Content-Type: application/json\r\n"
|
129
129
|
-> "Transfer-Encoding: chunked\r\n"
|
130
130
|
-> "\r\n"
|
131
131
|
-> "cf\r\n"
|
132
132
|
reading 207 bytes...
|
133
|
-
-> "{\"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\":\"
|
133
|
+
-> "{\"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\":\"5b37cf15b0e65\"}"
|
134
134
|
read 207 bytes
|
135
135
|
reading 2 bytes...
|
136
136
|
-> "\r\n"
|
@@ -142,25 +142,25 @@ opening connection to api.sandbox.paypal.com:443...
|
|
142
142
|
opened
|
143
143
|
starting SSL for api.sandbox.paypal.com:443...
|
144
144
|
SSL established
|
145
|
-
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
145
|
+
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A015i3t8ei9F.wNyHZRs7RePr0Ofsl2n1G1Z6BpZL4.Dh0A\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.9 (paypal-sdk-core 0.2.9; ruby 2.1.2p95-x86_64-darwin13.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"
|
146
146
|
<- "{}"
|
147
|
-
-> "HTTP/1.1
|
147
|
+
-> "HTTP/1.1 500 Internal Server Error\r\n"
|
148
148
|
-> "Server: Apache-Coyote/1.1\r\n"
|
149
|
-
-> "PROXY_SERVER_INFO: host=
|
150
|
-
-> "Paypal-Debug-Id:
|
151
|
-
-> "SERVER_INFO: paymentsplatformserv:v1.payments.payment&CalThreadId=
|
152
|
-
-> "CORRELATION-ID:
|
149
|
+
-> "PROXY_SERVER_INFO: host=slcsbjava3.slc.paypal.com;threadId=768254\r\n"
|
150
|
+
-> "Paypal-Debug-Id: 469a309bada6e\r\n"
|
151
|
+
-> "SERVER_INFO: paymentsplatformserv:v1.payments.payment&CalThreadId=63692&TopLevelTxnStartTime=146d4425c64&Host=slcsbjm1.slc.paypal.com&pid=22831\r\n"
|
152
|
+
-> "CORRELATION-ID: 469a309bada6e\r\n"
|
153
153
|
-> "Content-Language: *\r\n"
|
154
|
-
-> "Date:
|
154
|
+
-> "Date: Wed, 25 Jun 2014 18:20:56 GMT\r\n"
|
155
155
|
-> "Connection: close\r\n"
|
156
156
|
-> "Content-Type: application/json\r\n"
|
157
157
|
-> "Transfer-Encoding: chunked\r\n"
|
158
158
|
-> "Connection: close\r\n"
|
159
159
|
-> "\r\n"
|
160
|
-
-> "
|
161
|
-
reading
|
162
|
-
-> "{\"name\":\"
|
163
|
-
read
|
160
|
+
-> "d4\r\n"
|
161
|
+
reading 212 bytes...
|
162
|
+
-> "{\"name\":\"INTERNAL_SERVICE_ERROR\",\"message\":\"An internal service error has occurred\",\"information_link\":\"https://developer.paypal.com/webapps/developer/docs/api/#INTERNAL_SERVICE_ERROR\",\"debug_id\":\"469a309bada6e\"}"
|
163
|
+
read 212 bytes
|
164
164
|
reading 2 bytes...
|
165
165
|
-> "\r\n"
|
166
166
|
read 2 bytes
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayPal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|