paypal-sdk-core 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +5 -0
- data/Gemfile +1 -0
- data/LICENSE.txt +41 -0
- data/lib/paypal-sdk/core/api/base.rb +5 -0
- data/lib/paypal-sdk/core/api/merchant.rb +6 -2
- data/lib/paypal-sdk/core/openid_connect.rb +10 -4
- data/lib/paypal-sdk/core/openid_connect/api.rb +4 -2
- data/lib/paypal-sdk/core/version.rb +1 -1
- data/spec/core/api/merchant_spec.rb +9 -0
- data/spec/core/openid_connect_spec.rb +37 -10
- data/spec/log/rest_http.log +29 -29
- data/spec/spec_helper.rb +4 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5756a1dfda1dd82a085e6c97289a48d0a60bb99
|
4
|
+
data.tar.gz: b55a8713d8c4a7b13beeb9c723ed8e535292cba7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c49fabf85efddaf2774a719531ba6978d5bcd17c479d5509c6174192aca18f7cca024ec6b1bbc419595f118e4b50d0d4390f39fbf7b1577aa525471b6519fccd
|
7
|
+
data.tar.gz: 3d13c520c8a65f4e9705c7bf8739a7139644aa7c7f52306fe11a8ae18837e8be80cdded657d538efd4a4041b0e24aa0411edd632b5893c11c3aed34d38ca0437
|
data/CHANGELOG.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
Version 0.2.6 - Aug 30, 2013
|
2
|
+
- Added license name as "PayPal SDK License"
|
3
|
+
- Generate sandbox urls for openid connect
|
4
|
+
- Support Merchant API call without action/path
|
5
|
+
|
1
6
|
Version 0.2.5 - Jun 27, 2013
|
2
7
|
- Fix DateTime parser to support 0
|
3
8
|
- Set content-type header for generate-token REST API
|
data/Gemfile
CHANGED
data/LICENSE.txt
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
PAYPAL, INC.
|
2
|
+
|
3
|
+
SDK LICENSE
|
4
|
+
|
5
|
+
NOTICE TO USER: PayPal, Inc. is providing the Software and Documentation for use under the terms of this Agreement. Any use, reproduction, modification or distribution of the Software or Documentation, or any derivatives or portions hereof, constitutes your acceptance of this Agreement.
|
6
|
+
|
7
|
+
As used in this Agreement, "PayPal" means PayPal, Inc. "Software" means the software code accompanying this agreement. "Documentation" means the documents, specifications and all other items accompanying this Agreement other than the Software.
|
8
|
+
|
9
|
+
1. LICENSE GRANT Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, prepare derivative works from, publicly display, publicly perform, distribute and sublicense the Software for any purpose, provided the copyright notice below appears in a conspicuous location within the source code of the distributed Software and this license is distributed in the supporting documentation of the Software you distribute. Furthermore, you must comply with all third party licenses in order to use the third party software contained in the Software.
|
10
|
+
|
11
|
+
Subject to the terms of this Agreement, PayPal hereby grants you a non-exclusive, worldwide, royalty free license to use, reproduce, publicly display, publicly perform, distribute and sublicense the Documentation for any purpose. You may not modify the Documentation.
|
12
|
+
|
13
|
+
No title to the intellectual property in the Software or Documentation is transferred to you under the terms of this Agreement. You do not acquire any rights to the Software or the Documentation except as expressly set forth in this Agreement.
|
14
|
+
|
15
|
+
If you choose to distribute the Software in a commercial product, you do so with the understanding that you agree to defend, indemnify and hold harmless PayPal and its suppliers against any losses, damages and costs arising from the claims, lawsuits or other legal actions arising out of such distribution. You may distribute the Software in object code form under your own license, provided that your license agreement:
|
16
|
+
|
17
|
+
(a) complies with the terms and conditions of this license agreement;
|
18
|
+
|
19
|
+
(b) effectively disclaims all warranties and conditions, express or implied, on behalf of PayPal;
|
20
|
+
|
21
|
+
(c) effectively excludes all liability for damages on behalf of PayPal;
|
22
|
+
|
23
|
+
(d) states that any provisions that differ from this Agreement are offered by you alone and not PayPal; and
|
24
|
+
|
25
|
+
(e) states that the Software is available from you or PayPal and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
|
26
|
+
|
27
|
+
2. DISCLAIMER OF WARRANTY
|
28
|
+
PAYPAL LICENSES THE SOFTWARE AND DOCUMENTATION TO YOU ONLY ON AN "AS IS" BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. PAYPAL MAKES NO WARRANTY THAT THE SOFTWARE OR DOCUMENTATION WILL BE ERROR-FREE. Each user of the Software or Documentation is solely responsible for determining the appropriateness of using and distributing the Software and Documentation and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs, or equipment, and unavailability or interruption of operations. Use of the Software and Documentation is made with the understanding that PayPal will not provide you with any technical or customer support or maintenance. Some states or jurisdictions do not allow the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to you. To the extent permissible, any implied warranties are limited to ninety (90) days.
|
29
|
+
|
30
|
+
|
31
|
+
3. LIMITATION OF LIABILITY
|
32
|
+
PAYPAL AND ITS SUPPLIERS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING OUT OF THIS AGREEMENT OR FROM THE USE OF THE SOFTWARE OR DOCUMENTATION. IN NO EVENT WILL PAYPAL OR ITS SUPPLIERS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, OR SPECIAL DAMAGES INCLUDING LOST PROFITS, LOST SAVINGS, COSTS, FEES, OR EXPENSES OF ANY KIND ARISING OUT OF ANY PROVISION OF THIS AGREEMENT OR THE USE OR THE INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. PAYPAL'S AGGREGATE LIABILITY AND THAT OF ITS SUPPLIERS UNDER OR IN CONNECTION WITH THIS AGREEMENT SHALL BE LIMITED TO THE AMOUNT PAID BY YOU FOR THE SOFTWARE AND DOCUMENTATION.
|
33
|
+
|
34
|
+
4. TRADEMARK USAGE
|
35
|
+
PayPal is a trademark PayPal, Inc. in the United States and other countries. Such trademarks may not be used to endorse or promote any product unless expressly permitted under separate agreement with PayPal.
|
36
|
+
|
37
|
+
5. TERM
|
38
|
+
Your rights under this Agreement shall terminate if you fail to comply with any of the material terms or conditions of this Agreement and do not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all your rights under this Agreement terminate, you agree to cease use and distribution of the Software and Documentation as soon as reasonably practicable.
|
39
|
+
|
40
|
+
6. GOVERNING LAW AND JURISDICTION. This Agreement is governed by the statutes and laws of the State of California, without regard to the conflicts of law principles thereof. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. Any dispute arising out of or related to this Agreement shall be brought in the courts of Santa Clara County, California, USA.
|
41
|
+
|
@@ -92,23 +92,28 @@ module PayPal::SDK::Core
|
|
92
92
|
# * <tt>params</tt> -- (Optional) Parameters for the action
|
93
93
|
# * <tt>initheader</tt> -- (Optional) HTTP header
|
94
94
|
def post(action, params = {}, header = {})
|
95
|
+
action, params, header = "", action, params if action.is_a? Hash
|
95
96
|
api_call(:method => :post, :action => action, :params => params, :header => header)
|
96
97
|
end
|
97
98
|
alias_method :request, :post
|
98
99
|
|
99
100
|
def get(action, params = {}, header = {})
|
101
|
+
action, params, header = "", action, params if action.is_a? Hash
|
100
102
|
api_call(:method => :get, :action => action, :query => params, :params => nil, :header => header)
|
101
103
|
end
|
102
104
|
|
103
105
|
def patch(action, params = {}, header = {})
|
106
|
+
action, params, header = "", action, params if action.is_a? Hash
|
104
107
|
api_call(:method => :patch, :action => action, :params => params, :header => header)
|
105
108
|
end
|
106
109
|
|
107
110
|
def put(action, params = {}, header = {})
|
111
|
+
action, params, header = "", action, params if action.is_a? Hash
|
108
112
|
api_call(:method => :put, :action => action, :params => params, :header => header)
|
109
113
|
end
|
110
114
|
|
111
115
|
def delete(action, params = {}, header = {})
|
116
|
+
action, params, header = "", action, params if action.is_a? Hash
|
112
117
|
api_call(:method => :delete, :action => action, :params => params, :header => header)
|
113
118
|
end
|
114
119
|
|
@@ -98,7 +98,7 @@ module PayPal::SDK::Core
|
|
98
98
|
|
99
99
|
# Log additional information
|
100
100
|
def log_http_call(payload)
|
101
|
-
logger.info "Action: #{payload[:action]}" if payload[:action]
|
101
|
+
logger.info "Action: #{payload[:action]}" if payload[:action] and payload[:action] != ""
|
102
102
|
super
|
103
103
|
end
|
104
104
|
|
@@ -109,7 +109,11 @@ module PayPal::SDK::Core
|
|
109
109
|
# * <tt>action</tt> -- Request Action name
|
110
110
|
# * <tt>params</tt> -- Parameters for the action.
|
111
111
|
def request_body(action, params = {})
|
112
|
-
|
112
|
+
if action and action != ""
|
113
|
+
{ "ns:#{action}Req" => { "ns:#{action}Request" => DEFAULT_PARAMS.merge(params) } }
|
114
|
+
else
|
115
|
+
params
|
116
|
+
end
|
113
117
|
end
|
114
118
|
|
115
119
|
# Remove specified attributes from the given Hash
|
@@ -20,12 +20,12 @@ module PayPal::SDK
|
|
20
20
|
end
|
21
21
|
alias_method :config=, :set_config
|
22
22
|
|
23
|
-
AUTHORIZATION_URL = "
|
24
|
-
ENDSESSION_URL = "
|
23
|
+
AUTHORIZATION_URL = "paypal.com/webapps/auth/protocol/openidconnect/v1/authorize"
|
24
|
+
ENDSESSION_URL = "paypal.com/webapps/auth/protocol/openidconnect/v1/endsession"
|
25
25
|
DEFAULT_SCOPE = "openid"
|
26
26
|
|
27
27
|
def authorize_url(params = {})
|
28
|
-
uri = URI(AUTHORIZATION_URL)
|
28
|
+
uri = URI(url_for_mode(AUTHORIZATION_URL))
|
29
29
|
uri.query = api.encode_www_form({
|
30
30
|
:response_type => "code",
|
31
31
|
:scope => DEFAULT_SCOPE,
|
@@ -36,13 +36,19 @@ module PayPal::SDK
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def logout_url(params = {})
|
39
|
-
uri = URI(ENDSESSION_URL)
|
39
|
+
uri = URI(url_for_mode(ENDSESSION_URL))
|
40
40
|
uri.query = api.encode_www_form({
|
41
41
|
:logout => "true",
|
42
42
|
:redirect_uri => api.config.openid_redirect_uri
|
43
43
|
}.merge(params))
|
44
44
|
uri.to_s
|
45
45
|
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def url_for_mode(url)
|
50
|
+
"https://www.#{"sandbox." if api.api_mode == :sandbox}#{url}"
|
51
|
+
end
|
46
52
|
end
|
47
53
|
|
48
54
|
module DataTypes
|
@@ -5,14 +5,16 @@ module PayPal::SDK
|
|
5
5
|
module OpenIDConnect
|
6
6
|
class API < Core::API::Base
|
7
7
|
|
8
|
-
DEFAULT_OPENID_ENDPOINT =
|
8
|
+
DEFAULT_OPENID_ENDPOINT = {
|
9
|
+
:sandbox => "https://api.sandbox.paypal.com",
|
10
|
+
:live => "https://api.paypal.com" }
|
9
11
|
|
10
12
|
def initialize(environment = nil, options = {})
|
11
13
|
super("", environment, options)
|
12
14
|
end
|
13
15
|
|
14
16
|
def service_endpoint
|
15
|
-
self.config.openid_endpoint || DEFAULT_OPENID_ENDPOINT
|
17
|
+
self.config.openid_endpoint || DEFAULT_OPENID_ENDPOINT[self.api_mode] || DEFAULT_OPENID_ENDPOINT[:sandbox]
|
16
18
|
end
|
17
19
|
|
18
20
|
def format_request(payload)
|
@@ -69,6 +69,15 @@ describe PayPal::SDK::Core::API::Merchant do
|
|
69
69
|
response = client.request("TransactionSearch", TransactionSearchParams)
|
70
70
|
response["Ack"].should eql "Success"
|
71
71
|
end
|
72
|
+
|
73
|
+
it "with raw request" do
|
74
|
+
client = Merchant.new
|
75
|
+
response = client.request({
|
76
|
+
"ns:TransactionSearchReq" => {
|
77
|
+
"ns:TransactionSearchRequest" => TransactionSearchParams.merge("ebl:Version" => "94")
|
78
|
+
} } )
|
79
|
+
response["Ack"].should eql "Success"
|
80
|
+
end
|
72
81
|
end
|
73
82
|
|
74
83
|
describe "Format request" do
|
@@ -11,11 +11,25 @@ describe PayPal::SDK::OpenIDConnect do
|
|
11
11
|
OpenIDConnect::API.user_agent.should match "PayPalSDK/openid-connect-ruby"
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
describe "generate_authorize_url" do
|
15
|
+
|
16
|
+
it "generate autorize_url" do
|
17
|
+
url = OpenIDConnect::Tokeninfo.authorize_url
|
18
|
+
url.should match "client_id=client_id"
|
19
|
+
url.should match Regexp.escape("redirect_uri=#{CGI.escape("http://google.com")}")
|
20
|
+
url.should match "scope=openid"
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "sandbox" do
|
24
|
+
before do
|
25
|
+
PayPal::SDK.configure(:mode => "sandbox")
|
26
|
+
end
|
27
|
+
|
28
|
+
it "generates a sandbox authorize url" do
|
29
|
+
url = OpenIDConnect::Tokeninfo.authorize_url
|
30
|
+
url.should match "sandbox.paypal.com"
|
31
|
+
end
|
32
|
+
end
|
19
33
|
end
|
20
34
|
|
21
35
|
it "Override authorize_url params" do
|
@@ -91,11 +105,24 @@ describe PayPal::SDK::OpenIDConnect do
|
|
91
105
|
userinfo.name.should eql "Testing"
|
92
106
|
end
|
93
107
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
108
|
+
describe "logout_url" do
|
109
|
+
it "Generate logout_url" do
|
110
|
+
url = @tokeninfo.logout_url
|
111
|
+
url.should match "id_token=test_id_token"
|
112
|
+
url.should match "logout=true"
|
113
|
+
url.should match Regexp.escape("redirect_uri=#{CGI.escape("http://google.com")}")
|
114
|
+
end
|
115
|
+
|
116
|
+
describe "sandbox" do
|
117
|
+
before do
|
118
|
+
PayPal::SDK.configure(:mode => "sandbox")
|
119
|
+
end
|
120
|
+
|
121
|
+
it "generates a sandbox logout url" do
|
122
|
+
url = @tokeninfo.logout_url
|
123
|
+
url.should match "sandbox.paypal.com"
|
124
|
+
end
|
125
|
+
end
|
99
126
|
end
|
100
127
|
end
|
101
128
|
|
data/spec/log/rest_http.log
CHANGED
@@ -2,43 +2,43 @@ opening connection to api.sandbox.paypal.com:443...
|
|
2
2
|
opened
|
3
3
|
starting SSL for api.sandbox.paypal.com:443...
|
4
4
|
SSL established
|
5
|
-
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
5
|
+
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer jHPsUnuwb9F1xzqb8f0CYGhfpus5tv5cGtoJXbrQRo0\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.6 (paypal-sdk-core 0.2.6; ruby 2.0.0p247-x86_64-darwin12.4.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\nContent-Length: 286\r\n\r\n"
|
6
6
|
<- "{\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"4417119669820331\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}}]},\"transactions\":[{\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"}}]}"
|
7
7
|
-> "HTTP/1.1 201 Created\r\n"
|
8
8
|
-> "Server: Apache-Coyote/1.1\r\n"
|
9
|
-
-> "Date:
|
10
|
-
-> "PayPal-Debug-Id:
|
9
|
+
-> "Date: Fri, 30 Aug 2013 04:58:46 GMT\r\n"
|
10
|
+
-> "PayPal-Debug-Id: 589de4de60393\r\n"
|
11
11
|
-> "Content-Type: application/json\r\n"
|
12
12
|
-> "Content-Length: 1176\r\n"
|
13
13
|
-> "\r\n"
|
14
14
|
reading 1176 bytes...
|
15
|
-
-> "{\"id\":\"PAY-
|
15
|
+
-> "{\"id\":\"PAY-0DS51393N4328690CKIQCNAA\",\"create_time\":\"2013-08-30T04:58:40Z\",\"update_time\":\"2013-08-30T04:58: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\":\"74E51272GK930880A\",\"create_time\":\"2013-08-30T04:58:40Z\",\"update_time\":\"2013-08-30T04:58:46Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-0DS51393N4328690CKIQCNAA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/74E51272GK930880A\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/74E51272GK930880A/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0DS51393N4328690CKIQCNAA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0DS51393N4328690CKIQCNAA\",\"rel\":\"self\",\"method\":\"GET\"}]}"
|
16
16
|
read 1176 bytes
|
17
17
|
Conn keep-alive
|
18
18
|
opening connection to api.sandbox.paypal.com:443...
|
19
19
|
opened
|
20
20
|
starting SSL for api.sandbox.paypal.com:443...
|
21
21
|
SSL established
|
22
|
-
<- "GET /v1/payments/payment?count=10 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
22
|
+
<- "GET /v1/payments/payment?count=10 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer jHPsUnuwb9F1xzqb8f0CYGhfpus5tv5cGtoJXbrQRo0\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.6 (paypal-sdk-core 0.2.6; ruby 2.0.0p247-x86_64-darwin12.4.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\n\r\n"
|
23
23
|
-> "HTTP/1.1 200 OK\r\n"
|
24
24
|
-> "Server: Apache-Coyote/1.1\r\n"
|
25
|
-
-> "Date:
|
26
|
-
-> "PayPal-Debug-Id:
|
25
|
+
-> "Date: Fri, 30 Aug 2013 04:58:52 GMT\r\n"
|
26
|
+
-> "PayPal-Debug-Id: e55d5eb26e410\r\n"
|
27
27
|
-> "Content-Type: application/json\r\n"
|
28
28
|
-> "Transfer-Encoding: chunked\r\n"
|
29
29
|
-> "\r\n"
|
30
30
|
-> "2000\r\n"
|
31
31
|
reading 8192 bytes...
|
32
|
-
-> "{\"payments\":[{\"id\":\"PAY-
|
32
|
+
-> "{\"payments\":[{\"id\":\"PAY-0DS51393N4328690CKIQCNAA\",\"create_time\":\"2013-08-30T04:58:40Z\",\"update_time\":\"2013-08-30T04:58: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\":\"74E51272GK930880A\",\"create_time\":\"2013-08-30T04:58:40Z\",\"update_time\":\"2013-08-30T04:58:46Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-0DS51393N4328690CKIQCNAA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/74E51272GK930880A\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/74E51272GK930880A/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0DS51393N4328690CKIQCNAA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0DS51393N4328690CKIQCNAA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-8R3930959K916330AKIQCHTI\",\"create_time\":\"2013-08-30T04:47:09Z\",\"update_time\":\"2013-08-30T04:47:11Z\",\"state\":\"approved\",\"intent\":\"sale\",\"payer\":{\"payment_method\":\"credit_card\",\"funding_instruments\":[{\"credit_card\":{\"type\":\"visa\",\"number\":\"xxxxxxxxxxxx5786\",\"expire_month\":\"6\",\"expire_year\":\"2018\",\"first_name\":\"sdfsd\",\"last_name\":\"dsfds\",\"billing_address\":{\"line1\":\"fdgg\",\"line2\":\".\",\"city\":\"dfgdf\",\"state\":\"Alabama\",\"postal_code\":\"65755\",\"country_code\":\"US\"}}}]},\"transactions\":[{\"amount\":{\"total\":\"10.00\",\"currency\":\"USD\",\"details\":{\"subtotal\":\"10.00\"}},\"description\":\"Registration Fee\",\"related_resources\":[{\"sale\":{\"id\":\"69109919WG6952913\",\"create_time\":\"2013-08-30T04:47:09Z\",\"update_time\":\"2013-08-30T04:47:11Z\",\"state\":\"completed\",\"amount\":{\"total\":\"10.00\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-8R3930959K916330AKIQCHTI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/69109919WG6952913\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/69109919WG6952913/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8R3930959K916330AKIQCHTI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8R3930959K916330AKIQCHTI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-7V779851CS505440NKIQCEZA\",\"create_time\":\"2013-08-30T04:41:08Z\",\"update_time\":\"2013-08-30T04:41: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\":\"96F496368T369135V\",\"create_time\":\"2013-08-30T04:41:08Z\",\"update_time\":\"2013-08-30T04:41:13Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-7V779851CS505440NKIQCEZA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/96F496368T369135V\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/96F496368T369135V/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-7V779851CS505440NKIQCEZA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-7V779851CS505440NKIQCEZA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-8EB278863A474793XKIQCEUY\",\"create_time\":\"2013-08-30T04:40:51Z\",\"update_time\":\"2013-08-30T04:40:56Z\",\"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\":\"85S03372X92215335\",\"create_time\":\"2013-08-30T04:40:51Z\",\"update_time\":\"2013-08-30T04:40:56Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-8EB278863A474793XKIQCEUY\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/85S03372X92215335\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/85S03372X92215335/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8EB278863A474793XKIQCEUY\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8EB278863A474793XKIQCEUY\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-0V627461U2870004WKIQCEJQ\",\"create_time\":\"2013-08-30T04:40:06Z\",\"update_time\":\"2013-08-30T04:40:11Z\",\"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\":\"0KG78962BM6495242\",\"create_time\":\"2013-08-30T04:40:06Z\",\"update_time\":\"2013-08-30T04:40:11Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-0V627461U2870004WKIQCEJQ\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0KG78962BM6495242\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/0KG78962BM6495242/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0V627461U2870004WKIQCEJQ\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-0V627461U2870004WKIQCEJQ\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-90X56842U2631360MKIQCEGA\",\"create_time\":\"2013-08-30T04:39:52Z\",\"update_time\":\"2013-08-30T04:39:57Z\",\"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\":\"9J7951070U078951M\",\"create_time\":\"2013-08-30T04:39:52Z\",\"update_time\":\"2013-08-30T04:39:57Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-90X56842U2631360MKIQCEGA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/9J7951070U078951M\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/9J7951070U078951M/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-90X56842U2631360MKIQCEGA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-90X56842U2631360MKIQCEGA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-68T340036C311945NKIQCEEI\",\"create_time\":\"2013-08-30T04:39:45Z\",\"update_time\":\"2013-08-30T04:39:50Z\",\"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\":\"4NR050459C704525B\",\"create_time\":\"2013-08-30T04:39:45Z\",\"update_time\":\"2013-08-30T04:39:50Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-68T340036C311945NKIQCEEI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/4NR050459C704525B\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/4NR050459C704525B/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payme"
|
33
33
|
read 8192 bytes
|
34
34
|
reading 2 bytes...
|
35
35
|
-> "\r\n"
|
36
36
|
read 2 bytes
|
37
|
-
-> "
|
38
|
-
reading
|
39
|
-
-> "
|
40
|
-
-> "
|
41
|
-
read
|
37
|
+
-> "ed9\r\n"
|
38
|
+
reading 3801 bytes...
|
39
|
+
-> "nts/payment/PAY-68T340036C311945NKIQCEEI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-68T340036C311945NKIQCEEI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-8W452026L3042713WKIQCDVI\",\"create_time\":\"2013-08-30T04:38:45Z\",\"update_time\":\"2013-08-30T04:38:50Z\",\"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\",\"currenc"
|
40
|
+
-> "y\":\"USD\",\"details\":{\"subtotal\":\"7.47\"}},\"related_resources\":[{\"sale\":{\"id\":\"8SG27240ED024224W\",\"create_time\":\"2013-08-30T04:38:45Z\",\"update_time\":\"2013-08-30T04:38:50Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-8W452026L3042713WKIQCDVI\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/8SG27240ED024224W\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/8SG27240ED024224W/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8W452026L3042713WKIQCDVI\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-8W452026L3042713WKIQCDVI\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-1XX53492EH793494JKIQCDTA\",\"create_time\":\"2013-08-30T04:38:36Z\",\"update_time\":\"2013-08-30T04:38:41Z\",\"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\":\"2FS37015N20643941\",\"create_time\":\"2013-08-30T04:38:36Z\",\"update_time\":\"2013-08-30T04:38:41Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-1XX53492EH793494JKIQCDTA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/2FS37015N20643941\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/2FS37015N20643941/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-1XX53492EH793494JKIQCDTA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-1XX53492EH793494JKIQCDTA\",\"rel\":\"self\",\"method\":\"GET\"}]},{\"id\":\"PAY-41M589147A160374TKIQCDMA\",\"create_time\":\"2013-08-30T04:38:08Z\",\"update_time\":\"2013-08-30T04:38:14Z\",\"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\":\"1W104578DK030142W\",\"create_time\":\"2013-08-30T04:38:09Z\",\"update_time\":\"2013-08-30T04:38:14Z\",\"state\":\"completed\",\"amount\":{\"total\":\"7.47\",\"currency\":\"USD\"},\"parent_payment\":\"PAY-41M589147A160374TKIQCDMA\",\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1W104578DK030142W\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/sale/1W104578DK030142W/refund\",\"rel\":\"refund\",\"method\":\"POST\"},{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-41M589147A160374TKIQCDMA\",\"rel\":\"parent_payment\",\"method\":\"GET\"}]}}]}],\"links\":[{\"href\":\"https://api.sandbox.paypal.com/v1/payments/payment/PAY-41M589147A160374TKIQCDMA\",\"rel\":\"self\",\"method\":\"GET\"}]}],\"count\":10,\"next_id\":\"PAY-3NC28630H79858423KIQCDAY\"}"
|
41
|
+
read 3801 bytes
|
42
42
|
reading 2 bytes...
|
43
43
|
-> "\r\n"
|
44
44
|
read 2 bytes
|
@@ -49,67 +49,67 @@ opening connection to api.sandbox.paypal.com:443...
|
|
49
49
|
opened
|
50
50
|
starting SSL for api.sandbox.paypal.com:443...
|
51
51
|
SSL established
|
52
|
-
<- "POST /v1/vault/credit-card HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
52
|
+
<- "POST /v1/vault/credit-card HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer eGvOXNxkr0DrEnUV2ZhTYcO9Y2Ia1RLD2ePY19KadEk\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.6 (paypal-sdk-core 0.2.6; ruby 2.0.0p247-x86_64-darwin12.4.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\nContent-Length: 138\r\n\r\n"
|
53
53
|
<- "{\"type\":\"visa\",\"number\":\"4111111111111111\",\"expire_month\":\"11\",\"expire_year\":\"2018\",\"cvv2\":\"874\",\"first_name\":\"Joe\",\"last_name\":\"Shopper\"}"
|
54
54
|
-> "HTTP/1.1 201 Created\r\n"
|
55
55
|
-> "Server: Apache-Coyote/1.1\r\n"
|
56
|
-
-> "Date:
|
57
|
-
-> "PayPal-Debug-Id:
|
56
|
+
-> "Date: Fri, 30 Aug 2013 04:58:57 GMT\r\n"
|
57
|
+
-> "PayPal-Debug-Id: a7f585b46c1a2\r\n"
|
58
58
|
-> "Content-Type: application/json\r\n"
|
59
59
|
-> "Content-Length: 469\r\n"
|
60
60
|
-> "\r\n"
|
61
61
|
reading 469 bytes...
|
62
|
-
-> "{\"id\":\"CARD-
|
62
|
+
-> "{\"id\":\"CARD-8T334038NM032805UKIQCNEI\",\"valid_until\":\"2016-08-29T00: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-8T334038NM032805UKIQCNEI\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-8T334038NM032805UKIQCNEI\",\"rel\":\"delete\",\"method\":\"DELETE\"}]}"
|
63
63
|
read 469 bytes
|
64
64
|
Conn keep-alive
|
65
65
|
opening connection to api.sandbox.paypal.com:443...
|
66
66
|
opened
|
67
67
|
starting SSL for api.sandbox.paypal.com:443...
|
68
68
|
SSL established
|
69
|
-
<- "GET /v1/vault/credit-card/CARD-
|
69
|
+
<- "GET /v1/vault/credit-card/CARD-8T334038NM032805UKIQCNEI HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer eGvOXNxkr0DrEnUV2ZhTYcO9Y2Ia1RLD2ePY19KadEk\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.6 (paypal-sdk-core 0.2.6; ruby 2.0.0p247-x86_64-darwin12.4.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\n\r\n"
|
70
70
|
-> "HTTP/1.1 200 OK\r\n"
|
71
71
|
-> "Server: Apache-Coyote/1.1\r\n"
|
72
|
-
-> "Date:
|
73
|
-
-> "PayPal-Debug-Id:
|
72
|
+
-> "Date: Fri, 30 Aug 2013 04:58:59 GMT\r\n"
|
73
|
+
-> "PayPal-Debug-Id: 39a50b626c81f\r\n"
|
74
74
|
-> "Content-Type: application/json\r\n"
|
75
75
|
-> "Content-Length: 469\r\n"
|
76
76
|
-> "\r\n"
|
77
77
|
reading 469 bytes...
|
78
|
-
-> "{\"id\":\"CARD-
|
78
|
+
-> "{\"id\":\"CARD-8T334038NM032805UKIQCNEI\",\"valid_until\":\"2016-08-29T00: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-8T334038NM032805UKIQCNEI\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"https://api.sandbox.paypal.com/v1/vault/credit-card/CARD-8T334038NM032805UKIQCNEI\",\"rel\":\"delete\",\"method\":\"DELETE\"}]}"
|
79
79
|
read 469 bytes
|
80
80
|
Conn keep-alive
|
81
81
|
opening connection to api.sandbox.paypal.com:443...
|
82
82
|
opened
|
83
83
|
starting SSL for api.sandbox.paypal.com:443...
|
84
84
|
SSL established
|
85
|
-
<- "GET /v1/payments/payment/PAY-1234 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
85
|
+
<- "GET /v1/payments/payment/PAY-1234 HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer jHPsUnuwb9F1xzqb8f0CYGhfpus5tv5cGtoJXbrQRo0\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.6 (paypal-sdk-core 0.2.6; ruby 2.0.0p247-x86_64-darwin12.4.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\n\r\n"
|
86
86
|
-> "HTTP/1.1 404 Not Found\r\n"
|
87
87
|
-> "Server: Apache-Coyote/1.1\r\n"
|
88
|
-
-> "Date:
|
89
|
-
-> "PayPal-Debug-Id:
|
88
|
+
-> "Date: Fri, 30 Aug 2013 04:59:00 GMT\r\n"
|
89
|
+
-> "PayPal-Debug-Id: 05e0d1dd6d5ea\r\n"
|
90
90
|
-> "Content-Type: application/json\r\n"
|
91
91
|
-> "Content-Length: 207\r\n"
|
92
92
|
-> "\r\n"
|
93
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\":\"
|
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\":\"05e0d1dd6d5ea\"}"
|
95
95
|
read 207 bytes
|
96
96
|
Conn keep-alive
|
97
97
|
opening connection to api.sandbox.paypal.com:443...
|
98
98
|
opened
|
99
99
|
starting SSL for api.sandbox.paypal.com:443...
|
100
100
|
SSL established
|
101
|
-
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer
|
101
|
+
<- "POST /v1/payments/payment HTTP/1.1\r\nX-Paypal-Sandbox-Email-Address: Platform.sdk.seller@gmail.com\r\nAuthorization: Bearer jHPsUnuwb9F1xzqb8f0CYGhfpus5tv5cGtoJXbrQRo0\r\nContent-Type: application/json\r\nUser-Agent: PayPalSDK/sdk-core-ruby 0.2.6 (paypal-sdk-core 0.2.6; ruby 2.0.0p247-x86_64-darwin12.4.0)\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nHost: api.sandbox.paypal.com\r\nContent-Length: 2\r\n\r\n"
|
102
102
|
<- "{}"
|
103
103
|
-> "HTTP/1.1 400 Bad Request\r\n"
|
104
104
|
-> "Server: Apache-Coyote/1.1\r\n"
|
105
|
-
-> "Date:
|
105
|
+
-> "Date: Fri, 30 Aug 2013 04:59:03 GMT\r\n"
|
106
106
|
-> "Connection: close\r\n"
|
107
|
-
-> "PayPal-Debug-Id:
|
107
|
+
-> "PayPal-Debug-Id: 989f8c126df6d\r\n"
|
108
108
|
-> "Content-Type: application/json\r\n"
|
109
109
|
-> "Content-Length: 364\r\n"
|
110
110
|
-> "Connection: close\r\n"
|
111
111
|
-> "\r\n"
|
112
112
|
reading 364 bytes...
|
113
|
-
-> "{\"name\":\"VALIDATION_ERROR\",\"details\":[{\"field\":\"
|
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/webapps/developer/docs/api/#VALIDATION_ERROR\",\"debug_id\":\"989f8c126df6d\"}"
|
114
114
|
read 364 bytes
|
115
115
|
Conn close
|
data/spec/spec_helper.rb
CHANGED
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.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayPal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xml-simple
|
@@ -101,8 +101,10 @@ files:
|
|
101
101
|
- README.md
|
102
102
|
- Gemfile
|
103
103
|
- CHANGELOG.txt
|
104
|
+
- LICENSE.txt
|
104
105
|
homepage: https://developer.paypal.com
|
105
|
-
licenses:
|
106
|
+
licenses:
|
107
|
+
- PayPal SDK License
|
106
108
|
metadata: {}
|
107
109
|
post_install_message:
|
108
110
|
rdoc_options: []
|
@@ -120,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
122
|
version: '0'
|
121
123
|
requirements: []
|
122
124
|
rubyforge_project:
|
123
|
-
rubygems_version: 2.0.
|
125
|
+
rubygems_version: 2.0.4
|
124
126
|
signing_key:
|
125
127
|
specification_version: 4
|
126
128
|
summary: Core library for PayPal ruby SDKs
|