paypal-sdk-core 0.3.2 → 0.3.3
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/api/ipn.rb +2 -1
- data/lib/paypal-sdk/core/api/merchant.rb +4 -0
- data/lib/paypal-sdk/core/api/platform.rb +2 -1
- data/lib/paypal-sdk/core/util/http_helper.rb +5 -0
- data/lib/paypal-sdk/core/version.rb +1 -1
- data/spec/core/api/merchant_spec.rb +1 -1
- data/spec/core/api/rest_spec.rb +1 -1
- data/spec/log/rest_http.log +79 -63
- data/spec/spec_helper.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99eb338ac63000fc053b7aecc1d1de4fd5e46b05
|
4
|
+
data.tar.gz: 1d73f12aad0ea5851711a3a1f718baabe501da2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47f8efcf55b2cf2051a65995ab93880704320bed06f59d1db13d99781c335926c3695465397e9c264c5e0bf801631375113fb3d48dbef7df2b866ae7654749c3
|
7
|
+
data.tar.gz: 013fa1a7f31589adabefafcef0b4b00209f1dbf5ea8da4836ecd7bd0306b2c210498578fa6ba342f7201f0fb1fa43c7cacb128c631c30e4d7c3343f60be1ed72
|
data/CHANGELOG.txt
CHANGED
@@ -6,7 +6,8 @@ module PayPal
|
|
6
6
|
|
7
7
|
END_POINTS = {
|
8
8
|
:sandbox => "https://www.sandbox.paypal.com/cgi-bin/webscr",
|
9
|
-
:live => "https://www.paypal.com/cgi-bin/webscr"
|
9
|
+
:live => "https://www.paypal.com/cgi-bin/webscr",
|
10
|
+
:tls_test => "test-ipnpb.sandbox.paypal.com"
|
10
11
|
}
|
11
12
|
VERIFIED = "VERIFIED"
|
12
13
|
INVALID = "INVALID"
|
@@ -43,6 +43,10 @@ module PayPal::SDK::Core
|
|
43
43
|
:live => {
|
44
44
|
:three_token => "https://api-3t.paypal.com/2.0/",
|
45
45
|
:certificate => "https://api.paypal.com/2.0/"
|
46
|
+
},
|
47
|
+
:tls_test => {
|
48
|
+
:certificate => "test-api.sandbox.paypal.com",
|
49
|
+
:three_token => "test-api-3t.sandbox.paypal.com"
|
46
50
|
}
|
47
51
|
}
|
48
52
|
|
@@ -28,7 +28,8 @@ module PayPal::SDK::Core
|
|
28
28
|
"requestEnvelope" => { "errorLanguage" => "en_US" } })
|
29
29
|
DEFAULT_END_POINTS = {
|
30
30
|
:sandbox => "https://svcs.sandbox.paypal.com/",
|
31
|
-
:live => "https://svcs.paypal.com/"
|
31
|
+
:live => "https://svcs.paypal.com/",
|
32
|
+
:tls_test => "test-svcs.sandbox.paypal.com"
|
32
33
|
}
|
33
34
|
|
34
35
|
# Get service end point
|
@@ -43,6 +43,11 @@ module PayPal::SDK::Core
|
|
43
43
|
https.use_ssl = true
|
44
44
|
https.ca_file = default_ca_file
|
45
45
|
https.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
46
|
+
begin
|
47
|
+
https.ssl_version = :TLSv1_2
|
48
|
+
rescue => error
|
49
|
+
logger.warn("WARNING: TLSv1.2 is not supported. Your connection may not be secure. You MUST update to the latest security library")
|
50
|
+
end
|
46
51
|
config.ssl_options.each do |key, value|
|
47
52
|
http.send("#{key}=", value)
|
48
53
|
end
|
@@ -143,7 +143,7 @@ describe PayPal::SDK::Core::API::Merchant do
|
|
143
143
|
lambda {
|
144
144
|
client = Merchant.new
|
145
145
|
response = client.request("InvalidAction", TransactionSearchParams )
|
146
|
-
}.should raise_error PayPal::SDK::Core::Exceptions::
|
146
|
+
}.should raise_error PayPal::SDK::Core::Exceptions::ResourceNotFound
|
147
147
|
end
|
148
148
|
|
149
149
|
it "invalid params" do
|
data/spec/core/api/rest_spec.rb
CHANGED
@@ -76,7 +76,7 @@ describe PayPal::SDK::Core::API::REST do
|
|
76
76
|
}.should raise_error PayPal::SDK::Core::Exceptions::UnauthorizedAccess
|
77
77
|
end
|
78
78
|
|
79
|
-
|
79
|
+
xit "Should handle expired token" do
|
80
80
|
old_token = @api.token
|
81
81
|
@api.token_hash[:expires_in] = 0
|
82
82
|
@api.token.should_not eql old_token
|
data/spec/log/rest_http.log
CHANGED
@@ -2,7 +2,7 @@ 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 A101.hId1qE8T-o5Ivl1NFLN8Qw9KuOiP24j_tAZtSQFaYgG237PFlAQriLQmTT-lpWAq.rMWnOADJN5X18frvWy_F_2ikOvy\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.3.3 (paypal-sdk-core 0.3.3; ruby 2.2.3p173-x86_64-darwin14)\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
|
Conn close because of error Net::ReadTimeout
|
8
8
|
Conn close because of error Net::ReadTimeout
|
@@ -10,44 +10,36 @@ opening connection to api.sandbox.paypal.com:443...
|
|
10
10
|
opened
|
11
11
|
starting SSL for api.sandbox.paypal.com:443...
|
12
12
|
SSL established
|
13
|
-
<- "GET /v1/payments/payment?count=10 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
13
|
+
<- "GET /v1/payments/payment?count=10 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A101.hId1qE8T-o5Ivl1NFLN8Qw9KuOiP24j_tAZtSQFaYgG237PFlAQriLQmTT-lpWAq.rMWnOADJN5X18frvWy_F_2ikOvy\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.3.3 (paypal-sdk-core 0.3.3; ruby 2.2.3p173-x86_64-darwin14)\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"
|
14
14
|
-> "HTTP/1.1 200 OK\r\n"
|
15
|
-
-> "Date: Tue,
|
15
|
+
-> "Date: Tue, 15 Dec 2015 14:57:55 GMT\r\n"
|
16
16
|
-> "Server: Apache\r\n"
|
17
|
-
-> "PROXY_SERVER_INFO: host=
|
18
|
-
-> "Paypal-Debug-Id:
|
19
|
-
-> "CORRELATION-ID:
|
17
|
+
-> "PROXY_SERVER_INFO: host=slcsbplatformapiserv3001.slc.paypal.com;threadId=515\r\n"
|
18
|
+
-> "Paypal-Debug-Id: bed4d1e29104a\r\n"
|
19
|
+
-> "CORRELATION-ID: bed4d1e29104a\r\n"
|
20
20
|
-> "Content-Language: *\r\n"
|
21
|
-
-> "
|
22
|
-
-> "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT\r\n"
|
21
|
+
-> "Paypal-Debug-Id: bed4d1e29104a\r\n"
|
23
22
|
-> "Vary: Authorization\r\n"
|
23
|
+
-> "Content-Type: application/json\r\n"
|
24
|
+
-> "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D880%26app%3Dplatformapiserv%26TIME%3D1932161110; domain=.paypal.com; path=/; Secure; HttpOnly\r\n"
|
25
|
+
-> "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT\r\n"
|
24
26
|
-> "Connection: close\r\n"
|
25
27
|
-> "Transfer-Encoding: chunked\r\n"
|
26
|
-
-> "Content-Type: application/json\r\n"
|
27
|
-
-> "\r\n"
|
28
|
-
-> "2000\r\n"
|
29
|
-
reading 8192 bytes...
|
30
|
-
-> ""
|
31
|
-
-> "{\"payments\":[{\"id\":\"PAY-3RH76625GH470074EKYAUFFY\",\"create_time\":\"2015-09-22T11:59:19Z\",\"update_time\":\"2015-09-22T11:59:48Z\",\"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\":\"1XV70818GV122862R\",\"create_time\":\"2015-09-22T11:59:19Z\",\"update_time\":\"2015-09-22T11:59:48Z\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-3RH76625GH470074EKYAUFFY\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1XV70818GV122862R\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1XV70818GV122862R/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3RH76625GH470074EKYAUFFY\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3RH76625GH470074EKYAUFFY\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-02A09420YC130910CKYAUFBQ\",\"create_time\":\"2015-09-22T11:59:02Z\",\"update_time\":\"2015-09-22T11:59:30Z\",\"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\":\"0T0672351R759241E\",\"create_time\":\"2015-09-22T11:59:02Z\",\"update_time\":\"2015-09-22T11:59:30Z\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-02A09420YC130910CKYAUFBQ\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0T0672351R759241E\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0T0672351R759241E/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-02A09420YC130910CKYAUFBQ\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-02A09420YC130910CKYAUFBQ\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-1V956364333503206KYAT7QQ\",\"create_time\":\"2015-09-22T11:47:14Z\",\"update_time\":\"2015-09-22T11:47: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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"sale\":{\"id\":\"9W8752054X547704M\",\"create_time\":\"2015-09-22T11:47:14Z\",\"update_time\":\"2015-09-22T11:47:43Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-1V956364333503206KYAT7QQ\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/9W8752054X547704M\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/9W8752054X547704M/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-1V956364333503206KYAT7QQ\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-1V956364333503206KYAT7QQ\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-9RM90042SK972640WKYAT7OA\",\"create_time\":\"2015-09-22T11:47:04Z\",\"update_time\":\"2015-09-22T11:47:33Z\",\"state\":\"approved\",\"intent\":\"authorize\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"authorization\":{\"id\":\"21929299179433516\",\"create_time\":\"2015-09-22T11:47:04Z\",\"update_time\":\"2015-09-22T11:47:33Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"state\":\"authorized\",\"parent_payment\":\"PAY-9RM90042SK972640WKYAT7OA\",\"valid_until\":\"2015-10-21T11:47:04Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/21929299179433516\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/21929299179433516/capture\",\"rel\":\"capture\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/21929299179433516/void\",\"rel\":\"void\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-9RM90042SK972640WKYAT7OA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-9RM90042SK972640WKYAT7OA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-3TB96836HU018825FKYAT7EY\",\"create_time\":\"2015-09-22T11:46:27Z\",\"update_time\":\"2015-09-22T11:46:58Z\",\"state\":\"approved\",\"intent\":\"authorize\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"authorization\":{\"id\":\"0LS96308AM687090A\",\"create_time\":\"2015-09-22T11:46:27Z\",\"update_time\":\"2015-09-22T11:46:58Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"state\":\"voided\",\"parent_payment\":\"PAY-3TB96836HU018825FKYAT7EY\",\"valid_until\":\"2015-10-21T11:46:27Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/0LS96308AM687090A\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3TB96836HU018825FKYAT7EY\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3TB96836HU018825FKYAT7EY\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-9L561547RL126160JKYAT67Q\",\"create_time\":\"2015-09-22T11:46:06Z\",\"update_time\":\"2015-09-22T11:47:03Z\",\"state\":\"approved\",\"intent\":\"authorize\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"authorization\":{\"id\":\"9WF88233CE948340L\",\"create_time\":\"2015-09-22T11:46:06Z\",\"update_time\":\"2015-09-22T11:46:38Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"state\":\"captured\",\"parent_payment\":\"PAY-9L561547RL126160JKYAT67Q\",\"valid_until\":\"2015-10-21T11:46:06Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/9WF88233CE948340L\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-9L561547RL126160JKYAT67Q\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}},{\"capture\":{\"id\":\"3Y373150J9669033K\",\"create_time\":\"2015-09-22T11:46:39Z\",\"update_time\":\"2015-09-22T11:47:03Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-9L561547RL126160JKYAT67Q\",\"transaction_fee\":{\"value\":\"0.03\",\"currency\":\"USD\"},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/capture/3Y373150J9669033K\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/paym"
|
32
|
-
read 8192 bytes
|
33
|
-
reading 2 bytes...
|
34
|
-
-> ""
|
35
28
|
-> "\r\n"
|
36
|
-
read 2 bytes
|
37
29
|
-> "2000\r\n"
|
38
30
|
reading 8192 bytes...
|
39
31
|
-> ""
|
40
|
-
-> "
|
32
|
+
-> "{\"payments\":[{\"id\":\"PAY-0YG846993M2456041KZYCUGQ\",\"create_time\":\"2015-12-15T14:56:26Z\",\"update_time\":\"2015-12-15T14:57:02Z\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"related_resources\":[{\"sale\":{\"id\":\"487294476F540202M\",\"create_time\":\"2015-12-15T14:56:26Z\",\"update_time\":\"2015-12-15T14:57:02Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\"},\"state\":\"partially_refunded\",\"parent_payment\":\"PAY-0YG846993M2456041KZYCUGQ\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/487294476F540202M\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/487294476F540202M/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0YG846993M2456041KZYCUGQ\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}},{\"refund\":{\"id\":\"4K29957333047035F\",\"create_time\":\"2015-12-15T14:57:02Z\",\"update_time\":\"2015-12-15T14:57:02Z\",\"state\":\"completed\",\"amount\":{\"total\":\"-0.01\",\"currency\":\"USD\"},\"sale_id\":\"487294476F540202M\",\"parent_payment\":\"PAY-0YG846993M2456041KZYCUGQ\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/refund/4K29957333047035F\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0YG846993M2456041KZYCUGQ\",\"rel\":\"parent_payment\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/487294476F540202M\",\"rel\":\"sale\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0YG846993M2456041KZYCUGQ\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-45G575143J484974MKZYCT6A\",\"create_time\":\"2015-12-15T14:55:52Z\",\"update_time\":\"2015-12-15T14:56: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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"related_resources\":[{\"sale\":{\"id\":\"2YS17094AC812235C\",\"create_time\":\"2015-12-15T14:55:52Z\",\"update_time\":\"2015-12-15T14:56:24Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-45G575143J484974MKZYCT6A\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/2YS17094AC812235C\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/2YS17094AC812235C/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-45G575143J484974MKZYCT6A\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-45G575143J484974MKZYCT6A\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-869263617V809840GKZYCTSA\",\"create_time\":\"2015-12-15T14:55:04Z\",\"update_time\":\"2015-12-15T14:55:34Z\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"sale\":{\"id\":\"7HR4440354428890D\",\"create_time\":\"2015-12-15T14:55:04Z\",\"update_time\":\"2015-12-15T14:55:34Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-869263617V809840GKZYCTSA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/7HR4440354428890D\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/7HR4440354428890D/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-869263617V809840GKZYCTSA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-869263617V809840GKZYCTSA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-0UD45141PN835482HKZYCTGQ\",\"create_time\":\"2015-12-15T14:54:18Z\",\"update_time\":\"2015-12-15T14:54: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\":\"0FJ55850E5285564K\",\"create_time\":\"2015-12-15T14:54:18Z\",\"update_time\":\"2015-12-15T14:54:47Z\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-0UD45141PN835482HKZYCTGQ\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0FJ55850E5285564K\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0FJ55850E5285564K/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0UD45141PN835482HKZYCTGQ\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0UD45141PN835482HKZYCTGQ\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-05X50299H81849343KZYCTGI\",\"create_time\":\"2015-12-15T14:54:17Z\",\"update_time\":\"2015-12-15T14:54:48Z\",\"state\":\"approved\",\"intent\":\"authorize\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"authorization\":{\"id\":\"9BB03829M71038631\",\"create_time\":\"2015-12-15T14:54:17Z\",\"update_time\":\"2015-12-15T14:54:48Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"state\":\"voided\",\"parent_payment\":\"PAY-05X50299H81849343KZYCTGI\",\"valid_until\":\"2016-01-13T14:54:17Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/9BB03829M71038631\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-05X50299H81849343KZYCTGI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-05X50299H81849343KZYCTGI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-22G228176H347352PKZYCS6A\",\"create_time\":\"2015-12-15T14:53:44Z\",\"update_time\":\"2015-12-15T14:54:14Z\",\"state\":\"approved\",\"intent\":\"authorize\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"authorization\":{\"id\":\"0NJ773576D4424437\",\"create_time\":\"2015-12-15T14:53:44Z\",\"update_time\":\"2015-12-15T14:54:14Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"state\":\"authorized\",\"parent_payment\":\"PAY-22G228176H347352PKZYCS6A\",\"valid_until\":\"2016-01-13T14:53:44Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/0NJ773576D4424437\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/0NJ773576D4424437/capture\",\"rel\":\"capture\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/0NJ773576D4424437/void\""
|
41
33
|
read 8192 bytes
|
42
34
|
reading 2 bytes...
|
43
35
|
-> ""
|
44
36
|
-> "\r\n"
|
45
37
|
read 2 bytes
|
46
|
-
-> "
|
47
|
-
reading
|
38
|
+
-> "1ec8\r\n"
|
39
|
+
reading 7880 bytes...
|
48
40
|
-> ""
|
49
|
-
-> "-
|
50
|
-
read
|
41
|
+
-> ",\"rel\":\"void\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-22G228176H347352PKZYCS6A\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-22G228176H347352PKZYCS6A\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-70F215881T658763SKZYCSPY\",\"create_time\":\"2015-12-15T14:52:47Z\",\"update_time\":\"2015-12-15T14:53:42Z\",\"state\":\"approved\",\"intent\":\"authorize\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"authorization\":{\"id\":\"47420057GJ5251725\",\"create_time\":\"2015-12-15T14:52:47Z\",\"update_time\":\"2015-12-15T14:53:17Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"state\":\"captured\",\"parent_payment\":\"PAY-70F215881T658763SKZYCSPY\",\"valid_until\":\"2016-01-13T14:52:47Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/47420057GJ5251725\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-70F215881T658763SKZYCSPY\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}},{\"capture\":{\"id\":\"339584665K808471T\",\"create_time\":\"2015-12-15T14:53:18Z\",\"update_time\":\"2015-12-15T14:53:42Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\"},\"state\":\"refunded\",\"parent_payment\":\"PAY-70F215881T658763SKZYCSPY\",\"transaction_fee\":{\"value\":\"0.33\",\"currency\":\"USD\"},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/capture/339584665K808471T\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-70F215881T658763SKZYCSPY\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}},{\"refund\":{\"id\":\"0XG95807KG731332X\",\"create_time\":\"2015-12-15T14:53:42Z\",\"update_time\":\"2015-12-15T14:53:42Z\",\"state\":\"completed\",\"amount\":{\"total\":\"-1.00\",\"currency\":\"USD\"},\"capture_id\":\"339584665K808471T\",\"parent_payment\":\"PAY-70F215881T658763SKZYCSPY\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/refund/0XG95807KG731332X\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-70F215881T658763SKZYCSPY\",\"rel\":\"parent_payment\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/capture/339584665K808471T\",\"rel\":\"capture\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-70F215881T658763SKZYCSPY\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-33B78201NX7616832KZYCSCI\",\"create_time\":\"2015-12-15T14:51:53Z\",\"update_time\":\"2015-12-15T14:52:45Z\",\"state\":\"approved\",\"intent\":\"authorize\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"authorization\":{\"id\":\"2WS58748DR592904V\",\"create_time\":\"2015-12-15T14:51:53Z\",\"update_time\":\"2015-12-15T14:52:23Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"state\":\"captured\",\"parent_payment\":\"PAY-33B78201NX7616832KZYCSCI\",\"valid_until\":\"2016-01-13T14:51:53Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/2WS58748DR592904V\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-33B78201NX7616832KZYCSCI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}},{\"capture\":{\"id\":\"70R08006VT4434428\",\"create_time\":\"2015-12-15T14:52:23Z\",\"update_time\":\"2015-12-15T14:52:45Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-33B78201NX7616832KZYCSCI\",\"transaction_fee\":{\"value\":\"0.33\",\"currency\":\"USD\"},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/capture/70R08006VT4434428\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/capture/70R08006VT4434428/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-33B78201NX7616832KZYCSCI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-33B78201NX7616832KZYCSCI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-25P81941CN7067306KZYCR6A\",\"create_time\":\"2015-12-15T14:51:36Z\",\"update_time\":\"2015-12-15T14:52:06Z\",\"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\":\"8N029539L6347231K\",\"create_time\":\"2015-12-15T14:51:36Z\",\"update_time\":\"2015-12-15T14:52:06Z\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-25P81941CN7067306KZYCR6A\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/8N029539L6347231K\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/8N029539L6347231K/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-25P81941CN7067306KZYCR6A\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-25P81941CN7067306KZYCR6A\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-3EL13428VN703543MKZYCRVA\",\"create_time\":\"2015-12-15T14:51:00Z\",\"update_time\":\"2015-12-15T14:51:51Z\",\"state\":\"approved\",\"intent\":\"authorize\",\"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\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"description\":\"This is the payment transaction description.\",\"item_list\":{\"items\":[{\"name\":\"item\",\"sku\":\"item\",\"price\":\"1.00\",\"currency\":\"USD\",\"quantity\":\"1\"}]},\"related_resources\":[{\"authorization\":{\"id\":\"9HP84416W7628433Y\",\"create_time\":\"2015-12-15T14:51:00Z\",\"update_time\":\"2015-12-15T14:51:28Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"1.00\"}},\"state\":\"captured\",\"parent_payment\":\"PAY-3EL13428VN703543MKZYCRVA\",\"valid_until\":\"2016-01-13T14:51:00Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/authorization/9HP84416W7628433Y\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3EL13428VN703543MKZYCRVA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}},{\"capture\":{\"id\":\"9XB76681DE454232U\",\"create_time\":\"2015-12-15T14:51:30Z\",\"update_time\":\"2015-12-15T14:51:51Z\",\"amount\":{\"total\":\"1.00\",\"currency\":\"USD\"},\"state\":\"completed\",\"parent_payment\":\"PAY-3EL13428VN703543MKZYCRVA\",\"transaction_fee\":{\"value\":\"0.33\",\"currency\":\"USD\"},\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/capture/9XB76681DE454232U\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/capture/9XB76681DE454232U/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3EL13428VN703543MKZYCRVA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-3EL13428VN703543MKZYCRVA\",\"rel\":\"self\",\"method\":\"GET\"}]}],\"count\":10,\"next_id\":\"PAY-2RN60472F51335949KZYCQQQ\"}"
|
42
|
+
read 7880 bytes
|
51
43
|
reading 2 bytes...
|
52
44
|
-> ""
|
53
45
|
-> "\r\n"
|
@@ -59,73 +51,97 @@ opening connection to api.sandbox.paypal.com:443...
|
|
59
51
|
opened
|
60
52
|
starting SSL for api.sandbox.paypal.com:443...
|
61
53
|
SSL established
|
62
|
-
<- "POST /v1/vault/credit-card HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
54
|
+
<- "POST /v1/vault/credit-card HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A101.hId1qE8T-o5Ivl1NFLN8Qw9KuOiP24j_tAZtSQFaYgG237PFlAQriLQmTT-lpWAq.rMWnOADJN5X18frvWy_F_2ikOvy\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.3.3 (paypal-sdk-core 0.3.3; ruby 2.2.3p173-x86_64-darwin14)\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"
|
63
55
|
<- "{\"type\":\"visa\",\"number\":\"4111111111111111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"cvv2\":\"874\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}"
|
64
|
-
-> "HTTP/1.1
|
65
|
-
-> "Date: Tue,
|
56
|
+
-> "HTTP/1.1 201 Created\r\n"
|
57
|
+
-> "Date: Tue, 15 Dec 2015 14:58:16 GMT\r\n"
|
66
58
|
-> "Server: Apache\r\n"
|
67
|
-
-> "PROXY_SERVER_INFO: host=slcsbplatformapiserv3002.slc.paypal.com;threadId=
|
68
|
-
-> "Paypal-Debug-Id:
|
59
|
+
-> "PROXY_SERVER_INFO: host=slcsbplatformapiserv3002.slc.paypal.com;threadId=326\r\n"
|
60
|
+
-> "Paypal-Debug-Id: d19defb575400\r\n"
|
69
61
|
-> "Content-Language: *\r\n"
|
70
|
-
-> "CORRELATION-ID:
|
71
|
-
-> "
|
72
|
-
-> "
|
73
|
-
-> "
|
74
|
-
-> "
|
62
|
+
-> "CORRELATION-ID: d19defb575400\r\n"
|
63
|
+
-> "Content-Length: 667\r\n"
|
64
|
+
-> "Paypal-Debug-Id: d19defb575400\r\n"
|
65
|
+
-> "Vary: Authorization\r\n"
|
66
|
+
-> "Content-Type: application/json\r\n"
|
67
|
+
-> "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D880%26app%3Dplatformapiserv%26TIME%3D2284482646; domain=.paypal.com; path=/; Secure; HttpOnly\r\n"
|
75
68
|
-> "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT\r\n"
|
69
|
+
-> "Connection: close\r\n"
|
70
|
+
-> "\r\n"
|
71
|
+
reading 667 bytes...
|
72
|
+
-> "{\"id\":\"CARD-6DT64604VF629130XKZYCVCA\",\"state\":\"ok\",\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx1111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"valid_until\":\"2018-12-14T00:00:00Z\",\"create_time\":\"2015-12-15T14:58:16Z\",\"update_time\":\"2015-12-15T14:58:16Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-6DT64604VF629130XKZYCVCA\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-6DT64604VF629130XKZYCVCA\",\"rel\":\"delete\",\"method\":\"DELETE\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-6DT64604VF629130XKZYCVCA\",\"rel\":\"patch\",\"method\":\"PATCH\"}]}"
|
73
|
+
read 667 bytes
|
74
|
+
Conn close
|
75
|
+
opening connection to api.sandbox.paypal.com:443...
|
76
|
+
opened
|
77
|
+
starting SSL for api.sandbox.paypal.com:443...
|
78
|
+
SSL established
|
79
|
+
<- "GET /v1/vault/credit-card/CARD-6DT64604VF629130XKZYCVCA HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A101.hId1qE8T-o5Ivl1NFLN8Qw9KuOiP24j_tAZtSQFaYgG237PFlAQriLQmTT-lpWAq.rMWnOADJN5X18frvWy_F_2ikOvy\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.3.3 (paypal-sdk-core 0.3.3; ruby 2.2.3p173-x86_64-darwin14)\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"
|
80
|
+
-> "HTTP/1.1 200 OK\r\n"
|
81
|
+
-> "Date: Tue, 15 Dec 2015 14:58:17 GMT\r\n"
|
82
|
+
-> "Server: Apache\r\n"
|
83
|
+
-> "PROXY_SERVER_INFO: host=slcsbplatformapiserv3002.slc.paypal.com;threadId=448\r\n"
|
84
|
+
-> "Paypal-Debug-Id: e1c43371f66b\r\n"
|
85
|
+
-> "Content-Language: *\r\n"
|
86
|
+
-> "CORRELATION-ID: e1c43371f66b\r\n"
|
87
|
+
-> "Content-Length: 667\r\n"
|
88
|
+
-> "Paypal-Debug-Id: e1c43371f66b\r\n"
|
76
89
|
-> "Vary: Authorization\r\n"
|
77
90
|
-> "Content-Type: application/json\r\n"
|
91
|
+
-> "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D880%26app%3Dplatformapiserv%26TIME%3D2301259862; domain=.paypal.com; path=/; Secure; HttpOnly\r\n"
|
92
|
+
-> "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT\r\n"
|
93
|
+
-> "Connection: close\r\n"
|
78
94
|
-> "\r\n"
|
79
|
-
reading
|
80
|
-
-> "{\"
|
81
|
-
read
|
95
|
+
reading 667 bytes...
|
96
|
+
-> "{\"id\":\"CARD-6DT64604VF629130XKZYCVCA\",\"state\":\"ok\",\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx1111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\",\"valid_until\":\"2018-12-14T00:00:00Z\",\"create_time\":\"2015-12-15T14:58:16Z\",\"update_time\":\"2015-12-15T14:58:16Z\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-6DT64604VF629130XKZYCVCA\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-6DT64604VF629130XKZYCVCA\",\"rel\":\"delete\",\"method\":\"DELETE\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-6DT64604VF629130XKZYCVCA\",\"rel\":\"patch\",\"method\":\"PATCH\"}]}"
|
97
|
+
read 667 bytes
|
82
98
|
Conn close
|
83
99
|
opening connection to api.sandbox.paypal.com:443...
|
84
100
|
opened
|
85
101
|
starting SSL for api.sandbox.paypal.com:443...
|
86
102
|
SSL established
|
87
|
-
<- "GET /v1/payments/payment/PAY-1234 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
103
|
+
<- "GET /v1/payments/payment/PAY-1234 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A101.hId1qE8T-o5Ivl1NFLN8Qw9KuOiP24j_tAZtSQFaYgG237PFlAQriLQmTT-lpWAq.rMWnOADJN5X18frvWy_F_2ikOvy\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.3.3 (paypal-sdk-core 0.3.3; ruby 2.2.3p173-x86_64-darwin14)\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"
|
88
104
|
-> "HTTP/1.1 404 Not Found\r\n"
|
89
|
-
-> "Date: Tue,
|
105
|
+
-> "Date: Tue, 15 Dec 2015 14:58:17 GMT\r\n"
|
90
106
|
-> "Server: Apache\r\n"
|
91
|
-
-> "PROXY_SERVER_INFO: host=
|
92
|
-
-> "Paypal-Debug-Id:
|
93
|
-
-> "CORRELATION-ID:
|
107
|
+
-> "PROXY_SERVER_INFO: host=slcsbplatformapiserv3001.slc.paypal.com;threadId=526\r\n"
|
108
|
+
-> "Paypal-Debug-Id: d51b733d9d516\r\n"
|
109
|
+
-> "CORRELATION-ID: d51b733d9d516\r\n"
|
94
110
|
-> "Content-Language: *\r\n"
|
95
|
-
-> "Content-Length:
|
96
|
-
-> "Paypal-Debug-Id:
|
97
|
-
-> "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D880%26app%3Dplatformapiserv%26TIME%3D1765998934; domain=.paypal.com; path=/; Secure; HttpOnly\r\n"
|
98
|
-
-> "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT\r\n"
|
111
|
+
-> "Content-Length: 207\r\n"
|
112
|
+
-> "Paypal-Debug-Id: d51b733d9d516\r\n"
|
99
113
|
-> "Vary: Authorization\r\n"
|
100
|
-
-> "Connection: close\r\n"
|
101
114
|
-> "Content-Type: application/json\r\n"
|
115
|
+
-> "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D880%26app%3Dplatformapiserv%26TIME%3D2301259862; domain=.paypal.com; path=/; Secure; HttpOnly\r\n"
|
116
|
+
-> "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT\r\n"
|
117
|
+
-> "Connection: close\r\n"
|
102
118
|
-> "\r\n"
|
103
|
-
reading
|
104
|
-
-> "{\"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\":\"
|
105
|
-
read
|
119
|
+
reading 207 bytes...
|
120
|
+
-> "{\"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\":\"d51b733d9d516\"}"
|
121
|
+
read 207 bytes
|
106
122
|
Conn close
|
107
123
|
opening connection to api.sandbox.paypal.com:443...
|
108
124
|
opened
|
109
125
|
starting SSL for api.sandbox.paypal.com:443...
|
110
126
|
SSL established
|
111
|
-
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
127
|
+
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer A101.hId1qE8T-o5Ivl1NFLN8Qw9KuOiP24j_tAZtSQFaYgG237PFlAQriLQmTT-lpWAq.rMWnOADJN5X18frvWy_F_2ikOvy\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.3.3 (paypal-sdk-core 0.3.3; ruby 2.2.3p173-x86_64-darwin14)\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"
|
112
128
|
<- "{}"
|
113
|
-
-> "HTTP/1.1
|
114
|
-
-> "Date: Tue,
|
129
|
+
-> "HTTP/1.1 500 Internal Server Error\r\n"
|
130
|
+
-> "Date: Tue, 15 Dec 2015 14:58:18 GMT\r\n"
|
115
131
|
-> "Server: Apache\r\n"
|
116
|
-
-> "PROXY_SERVER_INFO: host=
|
117
|
-
-> "Paypal-Debug-Id:
|
118
|
-
-> "CORRELATION-ID:
|
132
|
+
-> "PROXY_SERVER_INFO: host=slcsbplatformapiserv3001.slc.paypal.com;threadId=416\r\n"
|
133
|
+
-> "Paypal-Debug-Id: a59221e33fb83\r\n"
|
134
|
+
-> "CORRELATION-ID: a59221e33fb83\r\n"
|
119
135
|
-> "Content-Language: *\r\n"
|
120
|
-
-> "
|
121
|
-
-> "
|
122
|
-
-> "Content-Length: 306\r\n"
|
123
|
-
-> "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D880%26app%3Dplatformapiserv%26TIME%3D1799553366; domain=.paypal.com; path=/; Secure; HttpOnly\r\n"
|
124
|
-
-> "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT\r\n"
|
136
|
+
-> "Content-Length: 212\r\n"
|
137
|
+
-> "Paypal-Debug-Id: a59221e33fb83\r\n"
|
125
138
|
-> "Vary: Authorization\r\n"
|
126
139
|
-> "Content-Type: application/json\r\n"
|
140
|
+
-> "Set-Cookie: X-PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D880%26app%3Dplatformapiserv%26TIME%3D2318037078; domain=.paypal.com; path=/; Secure; HttpOnly\r\n"
|
141
|
+
-> "Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT\r\n"
|
142
|
+
-> "Connection: close\r\n"
|
127
143
|
-> "\r\n"
|
128
|
-
reading
|
129
|
-
-> "{\"name\":\"
|
130
|
-
read
|
144
|
+
reading 212 bytes...
|
145
|
+
-> "{\"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\":\"a59221e33fb83\"}"
|
146
|
+
read 212 bytes
|
131
147
|
Conn close
|
data/spec/spec_helper.rb
CHANGED
@@ -20,4 +20,10 @@ Dir[File.expand_path("../support/**/*.rb", __FILE__)].each {|f| require f }
|
|
20
20
|
|
21
21
|
RSpec.configure do |config|
|
22
22
|
config.include SampleData
|
23
|
+
config.mock_with :rspec do |c|
|
24
|
+
c.syntax = [:should, :expect]
|
25
|
+
end
|
26
|
+
config.expect_with :rspec do |c|
|
27
|
+
c.syntax = [:should, :expect]
|
28
|
+
end
|
23
29
|
end
|
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.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayPal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
123
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
124
|
+
rubygems_version: 2.5.0
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: Core library for PayPal ruby SDKs
|