payoneer_api 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/payoneer_api.rb +12 -0
- data/lib/payoneer_api/api.rb +9 -0
- data/lib/payoneer_api/api/payees.rb +99 -0
- data/lib/payoneer_api/base.rb +17 -0
- data/lib/payoneer_api/client.rb +8 -97
- data/lib/payoneer_api/core_ext/hash.rb +4 -39
- data/lib/payoneer_api/payee.rb +34 -0
- data/lib/payoneer_api/payoneer_response.rb +5 -0
- data/lib/payoneer_api/payoneer_token.rb +18 -0
- data/lib/payoneer_api/request.rb +27 -0
- data/lib/payoneer_api/response.rb +37 -0
- data/lib/payoneer_api/utils.rb +33 -0
- data/lib/payoneer_api/version.rb +2 -2
- data/payoneer_api.gemspec +1 -0
- data/spec/fixtures/vcr_cassettes/PayoneerApi_API_Payees/_payee_details/associates_basic_contact_data_with_the_payee_object.yml +55 -0
- data/spec/fixtures/vcr_cassettes/PayoneerApi_API_Payees/_payee_details/returns_an_instance_of_a_Payee_object.yml +55 -0
- data/spec/fixtures/vcr_cassettes/{PayoneerApi_Client → PayoneerApi_API_Payees}/_payee_prefilled_signup_url/with_all_correct_params_passed_in/includes_a_token_parameter_in_this_url.yml +5 -5
- data/spec/fixtures/vcr_cassettes/{PayoneerApi_Client → PayoneerApi_API_Payees}/_payee_prefilled_signup_url/with_all_correct_params_passed_in/returns_a_url_to_the_prefilled_registration_page.yml +5 -5
- data/spec/fixtures/vcr_cassettes/{PayoneerApi_Client → PayoneerApi_API_Payees}/_payee_prefilled_signup_url/with_incorrect_login_credentials/returns_a_parsed_error_notification.yml +3 -3
- data/spec/fixtures/vcr_cassettes/PayoneerApi_API_Payees/_payee_signup_url/allows_you_to_us_the_to_s_method_on_that_object_to_obtain_the_registration_url.yml +49 -0
- data/spec/fixtures/vcr_cassettes/PayoneerApi_API_Payees/_payee_signup_url/allows_you_to_use_the_uri_method_to_get_the_URI_object_directly.yml +49 -0
- data/spec/fixtures/vcr_cassettes/{PayoneerApi_Client → PayoneerApi_API_Payees}/_payee_signup_url/returns_a_url_to_the_registration_page.yml +7 -7
- data/spec/fixtures/vcr_cassettes/PayoneerApi_API_Payees/_payee_signup_url/returns_payoneer_token.yml +49 -0
- data/spec/fixtures/vcr_cassettes/PayoneerApi_Client/_new_payee_prefilled_signup_url/returns_a_url_to_the_prefilled_registration_page.yml +5 -5
- data/spec/fixtures/vcr_cassettes/PayoneerApi_Client/_new_payee_signup_url/returns_a_url_to_the_registration_page_implicit_credentials_through_environment_variables_.yml +7 -7
- data/spec/payoneer_api/api/payees_spec.rb +83 -0
- data/spec/payoneer_api/client_spec.rb +6 -55
- data/spec/payoneer_api/payee_spec.rb +30 -0
- data/spec/spec_helper.rb +3 -0
- metadata +52 -9
@@ -0,0 +1,33 @@
|
|
1
|
+
module PayoneerApi
|
2
|
+
module Utils
|
3
|
+
# Turn a ruby boolean into an XML 'True'/'False' string
|
4
|
+
#
|
5
|
+
# @param boolean [Boolean] A boolean or nil.
|
6
|
+
# @return [nil, String]
|
7
|
+
def bool_to_string(boolean)
|
8
|
+
return nil if boolean.nil?
|
9
|
+
boolean ? 'True' : 'False'
|
10
|
+
end
|
11
|
+
|
12
|
+
def payout_methods_list(payout_methods)
|
13
|
+
payout_methods.is_a?(Array) ?
|
14
|
+
payout_methods.join(',') :
|
15
|
+
payout_methods.to_s
|
16
|
+
end
|
17
|
+
|
18
|
+
# @param request_method [Symbol]
|
19
|
+
# @param options [Hash]
|
20
|
+
def perform(request_method, options)
|
21
|
+
request = PayoneerApi::Request.new(self, request_method, options)
|
22
|
+
request.perform
|
23
|
+
end
|
24
|
+
|
25
|
+
# @param request_method [Symbol]
|
26
|
+
# @param options [Hash]
|
27
|
+
# @param klass [Class]
|
28
|
+
def perform_with_object(request_method, options, klass)
|
29
|
+
request = PayoneerApi::Request.new(self, request_method, options)
|
30
|
+
request.perform_with_object(klass)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/payoneer_api/version.rb
CHANGED
data/payoneer_api.gemspec
CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.homepage = 'https://github.com/donaldpiret/payoneer_api'
|
21
21
|
|
22
22
|
spec.add_dependency 'nokogiri', '~> 1.5'
|
23
|
+
spec.add_dependency 'activesupport', '>= 3.1', '< 5.0'
|
23
24
|
|
24
25
|
spec.add_development_dependency 'rspec', '~> 2.14'
|
25
26
|
spec.add_development_dependency 'vcr', '~> 2.9'
|
@@ -0,0 +1,55 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx?mname=GetPayeeDetails&p1=<PAYONEER_USERNAME>&p2=<PAYONEER_PASSWORD>&p3=<PAYONEER_PARTNER_ID>&p4=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache, no-store, must-revalidate
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=utf-8
|
27
|
+
Expires:
|
28
|
+
- '-1'
|
29
|
+
Set-Cookie:
|
30
|
+
- ASP.NET_SessionId=mhcx40ia4vsyxmpvlh1z1bmp; domain=.sandbox.payoneer.com;
|
31
|
+
path=/; secure; HttpOnly
|
32
|
+
- pid=<PAYONEER_PARTNER_ID>; domain=.sandbox.payoneer.com; expires=Mon, 04-May-2015 03:11:36
|
33
|
+
GMT; path=/; secure
|
34
|
+
P3p:
|
35
|
+
- CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
36
|
+
X-Powered-By:
|
37
|
+
- ASP.NET
|
38
|
+
Date:
|
39
|
+
- Mon, 05 May 2014 03:11:36 GMT
|
40
|
+
Content-Length:
|
41
|
+
- '618'
|
42
|
+
Connection:
|
43
|
+
- Keep-Alive
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?><GetPayeeDetails><Payee><FirstName>Test</FirstName><LastName>Test</LastName>
|
47
|
+
<Email>test@roomorama.com</Email><Address1>Test Address</Address1><Address2>Test Address2</Address2>
|
48
|
+
<City>New York</City><State>NY</State><Zip>10018</Zip><Country>US</Country><Phone>6594576031</Phone><Mobile></Mobile>
|
49
|
+
<PayOutMethod>Prepaid
|
50
|
+
Card</PayOutMethod><Cards><Card><CardID>0000000000000000</CardID><ActivationStatus>Not
|
51
|
+
Issued, Pending Approval</ActivationStatus><CardStatus>InActive</CardStatus></Card></Cards><RegDate>5/4/2014
|
52
|
+
11:09:24 PM</RegDate></Payee></GetPayeeDetails>
|
53
|
+
http_version:
|
54
|
+
recorded_at: Mon, 05 May 2014 03:11:36 GMT
|
55
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,55 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx?mname=GetPayeeDetails&p1=<PAYONEER_USERNAME>&p2=<PAYONEER_PASSWORD>&p3=<PAYONEER_PARTNER_ID>&p4=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache, no-store, must-revalidate
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=utf-8
|
27
|
+
Expires:
|
28
|
+
- '-1'
|
29
|
+
Set-Cookie:
|
30
|
+
- ASP.NET_SessionId=mhcx40ia4vsyxmpvlh1z1bmp; domain=.sandbox.payoneer.com;
|
31
|
+
path=/; secure; HttpOnly
|
32
|
+
- pid=<PAYONEER_PARTNER_ID>; domain=.sandbox.payoneer.com; expires=Mon, 04-May-2015 03:11:36
|
33
|
+
GMT; path=/; secure
|
34
|
+
P3p:
|
35
|
+
- CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
36
|
+
X-Powered-By:
|
37
|
+
- ASP.NET
|
38
|
+
Date:
|
39
|
+
- Mon, 05 May 2014 03:11:36 GMT
|
40
|
+
Content-Length:
|
41
|
+
- '618'
|
42
|
+
Connection:
|
43
|
+
- Keep-Alive
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?><GetPayeeDetails><Payee><FirstName>Test</FirstName><LastName>Test</LastName>
|
47
|
+
<Email>test@roomorama.com</Email><Address1>Test Address</Address1><Address2>Test Address2</Address2>
|
48
|
+
<City>New York</City><State>NY</State><Zip>10018</Zip><Country>US</Country><Phone>6594576031</Phone><Mobile></Mobile>
|
49
|
+
<PayOutMethod>Prepaid
|
50
|
+
Card</PayOutMethod><Cards><Card><CardID>0000000000000000</CardID><ActivationStatus>Not
|
51
|
+
Issued, Pending Approval</ActivationStatus><CardStatus>InActive</CardStatus></Card></Cards><RegDate>5/4/2014
|
52
|
+
11:09:24 PM</RegDate></Payee></GetPayeeDetails>
|
53
|
+
http_version:
|
54
|
+
recorded_at: Mon, 05 May 2014 03:11:36 GMT
|
55
|
+
recorded_with: VCR 2.9.0
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
|
-
string: mname=GetTokenXML&p1
|
8
|
+
string: mname=GetTokenXML&p1=<PAYONEER_USERNAME>&p2=<PAYONEER_PASSWORD>&p3=<PAYONEER_PARTNER_ID>&p4=1&xml=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CPayoneerDetails%3E%0A++%3CDetails%3E%0A++++%3CuserName%3E<PAYONEER_USERNAME>%3C%2FuserName%3E%0A++++%3Cpassword%3E<PAYONEER_PASSWORD>%3C%2Fpassword%3E%0A++++%3Cprid%3E<PAYONEER_PARTNER_ID>%3C%2Fprid%3E%0A++++%3Capuid%3E1%3C%2Fapuid%3E%0A++++%3Credirect%3Ehttp%3A%2F%2Ftest.com%2Fredirect%3C%2Fredirect%3E%0A++++%3CredirectTime%3E10%3C%2FredirectTime%3E%0A++++%3CPayoutMethodList%3EPrepaidCard%3C%2FPayoutMethodList%3E%0A++%3C%2FDetails%3E%0A++%3CPersonalDetails%3E%0A++++%3CfirstName%3EDonald%3C%2FfirstName%3E%0A++++%3ClastName%3EPiret%3C%2FlastName%3E%0A++++%3CdateOfBirth%3E04011984%3C%2FdateOfBirth%3E%0A++++%3Caddress1%3E115+Amoy+street%3C%2Faddress1%3E%0A++++%3Ccity%3ESingapore%3C%2Fcity%3E%0A++++%3CzipCode%3E069935%3C%2FzipCode%3E%0A++++%3Cphone%3E%2B123456789%3C%2Fphone%3E%0A++++%3Cemail%3Edonald%40roomorama.com%3C%2Femail%3E%0A++%3C%2FPersonalDetails%3E%0A%3C%2FPayoneerDetails%3E%0A
|
9
9
|
headers:
|
10
10
|
Accept-Encoding:
|
11
11
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -29,16 +29,16 @@ http_interactions:
|
|
29
29
|
Expires:
|
30
30
|
- '-1'
|
31
31
|
Set-Cookie:
|
32
|
-
- ASP.NET_SessionId=
|
32
|
+
- ASP.NET_SessionId=wkns3wvrfnjyvrguylqc4pds; domain=.sandbox.payoneer.com;
|
33
33
|
path=/; secure; HttpOnly
|
34
|
-
- pid
|
34
|
+
- pid=<PAYONEER_PARTNER_ID>; domain=.sandbox.payoneer.com; expires=Fri, 01-May-2015 08:54:01
|
35
35
|
GMT; path=/; secure
|
36
36
|
P3p:
|
37
37
|
- CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
38
38
|
X-Powered-By:
|
39
39
|
- ASP.NET
|
40
40
|
Date:
|
41
|
-
- Fri, 02 May 2014
|
41
|
+
- Fri, 02 May 2014 08:54:01 GMT
|
42
42
|
Content-Length:
|
43
43
|
- '185'
|
44
44
|
Connection:
|
@@ -47,5 +47,5 @@ http_interactions:
|
|
47
47
|
encoding: UTF-8
|
48
48
|
string: <?xml version="1.0" encoding="UTF-8"?><PayoneerToken><Token>http://payouts.sandbox.payoneer.com/partners/lp.aspx?token=b8e8eab41931475cb4b66b54996a7cb1A9A9579049</Token></PayoneerToken>
|
49
49
|
http_version:
|
50
|
-
recorded_at: Fri, 02 May 2014
|
50
|
+
recorded_at: Fri, 02 May 2014 08:53:59 GMT
|
51
51
|
recorded_with: VCR 2.9.0
|
@@ -5,7 +5,7 @@ http_interactions:
|
|
5
5
|
uri: https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
|
-
string: mname=GetTokenXML&p1
|
8
|
+
string: mname=GetTokenXML&p1=<PAYONEER_USERNAME>&p2=<PAYONEER_PASSWORD>&p3=<PAYONEER_PARTNER_ID>&p4=1&xml=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22%3F%3E%0A%3CPayoneerDetails%3E%0A++%3CDetails%3E%0A++++%3CuserName%3E<PAYONEER_USERNAME>%3C%2FuserName%3E%0A++++%3Cpassword%3E<PAYONEER_PASSWORD>%3C%2Fpassword%3E%0A++++%3Cprid%3E<PAYONEER_PARTNER_ID>%3C%2Fprid%3E%0A++++%3Capuid%3E1%3C%2Fapuid%3E%0A++++%3Credirect%3Ehttp%3A%2F%2Ftest.com%2Fredirect%3C%2Fredirect%3E%0A++++%3CredirectTime%3E10%3C%2FredirectTime%3E%0A++++%3CPayoutMethodList%3EPrepaidCard%3C%2FPayoutMethodList%3E%0A++%3C%2FDetails%3E%0A++%3CPersonalDetails%3E%0A++++%3CfirstName%3EDonald%3C%2FfirstName%3E%0A++++%3ClastName%3EPiret%3C%2FlastName%3E%0A++++%3CdateOfBirth%3E04011984%3C%2FdateOfBirth%3E%0A++++%3Caddress1%3E115+Amoy+street%3C%2Faddress1%3E%0A++++%3Ccity%3ESingapore%3C%2Fcity%3E%0A++++%3CzipCode%3E069935%3C%2FzipCode%3E%0A++++%3Cphone%3E%2B123456789%3C%2Fphone%3E%0A++++%3Cemail%3Edonald%40roomorama.com%3C%2Femail%3E%0A++%3C%2FPersonalDetails%3E%0A%3C%2FPayoneerDetails%3E%0A
|
9
9
|
headers:
|
10
10
|
Accept-Encoding:
|
11
11
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -29,16 +29,16 @@ http_interactions:
|
|
29
29
|
Expires:
|
30
30
|
- '-1'
|
31
31
|
Set-Cookie:
|
32
|
-
- ASP.NET_SessionId=
|
32
|
+
- ASP.NET_SessionId=e3zhgglqxavgw5herkx1blpo; domain=.sandbox.payoneer.com;
|
33
33
|
path=/; secure; HttpOnly
|
34
|
-
- pid
|
34
|
+
- pid=<PAYONEER_PARTNER_ID>; domain=.sandbox.payoneer.com; expires=Fri, 01-May-2015 08:53:58
|
35
35
|
GMT; path=/; secure
|
36
36
|
P3p:
|
37
37
|
- CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
38
38
|
X-Powered-By:
|
39
39
|
- ASP.NET
|
40
40
|
Date:
|
41
|
-
- Fri, 02 May 2014
|
41
|
+
- Fri, 02 May 2014 08:53:58 GMT
|
42
42
|
Content-Length:
|
43
43
|
- '185'
|
44
44
|
Connection:
|
@@ -47,5 +47,5 @@ http_interactions:
|
|
47
47
|
encoding: UTF-8
|
48
48
|
string: <?xml version="1.0" encoding="UTF-8"?><PayoneerToken><Token>http://payouts.sandbox.payoneer.com/partners/lp.aspx?token=b8e8eab41931475cb4b66b54996a7cb1A9A9579049</Token></PayoneerToken>
|
49
49
|
http_version:
|
50
|
-
recorded_at: Fri, 02 May 2014
|
50
|
+
recorded_at: Fri, 02 May 2014 08:53:55 GMT
|
51
51
|
recorded_with: VCR 2.9.0
|
@@ -29,14 +29,14 @@ http_interactions:
|
|
29
29
|
Expires:
|
30
30
|
- '-1'
|
31
31
|
Set-Cookie:
|
32
|
-
- ASP.NET_SessionId=
|
32
|
+
- ASP.NET_SessionId=30lzblkqerjfvt44pzf0imdu; domain=.sandbox.payoneer.com;
|
33
33
|
path=/; secure; HttpOnly
|
34
34
|
P3p:
|
35
35
|
- CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
36
36
|
X-Powered-By:
|
37
37
|
- ASP.NET
|
38
38
|
Date:
|
39
|
-
- Fri, 02 May 2014
|
39
|
+
- Fri, 02 May 2014 08:43:41 GMT
|
40
40
|
Content-Length:
|
41
41
|
- '220'
|
42
42
|
Connection:
|
@@ -46,5 +46,5 @@ http_interactions:
|
|
46
46
|
string: <?xml version='1.0' encoding='ISO-8859-1' ?><PayoneerResponse><Result>A00B556F</Result><Description>Unauthorized
|
47
47
|
Access or invalid parameters, please check your IP address and parameters.</Description></PayoneerResponse>
|
48
48
|
http_version:
|
49
|
-
recorded_at: Fri, 02 May 2014
|
49
|
+
recorded_at: Fri, 02 May 2014 08:43:39 GMT
|
50
50
|
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx?mname=GetToken&p1=<PAYONEER_USERNAME>&p10=True&p2=<PAYONEER_PASSWORD>&p3=<PAYONEER_PARTNER_ID>&p4=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache, no-store, must-revalidate
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=utf-8
|
27
|
+
Expires:
|
28
|
+
- '-1'
|
29
|
+
Set-Cookie:
|
30
|
+
- ASP.NET_SessionId=wqflppoqvgthzcbgnk2ki34f; domain=.sandbox.payoneer.com;
|
31
|
+
path=/; secure; HttpOnly
|
32
|
+
- pid=<PAYONEER_PARTNER_ID>; domain=.sandbox.payoneer.com; expires=Mon, 04-May-2015 02:17:44
|
33
|
+
GMT; path=/; secure
|
34
|
+
P3p:
|
35
|
+
- CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
36
|
+
X-Powered-By:
|
37
|
+
- ASP.NET
|
38
|
+
Date:
|
39
|
+
- Mon, 05 May 2014 02:17:44 GMT
|
40
|
+
Content-Length:
|
41
|
+
- '186'
|
42
|
+
Connection:
|
43
|
+
- Keep-Alive
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: <?xml version="1.0" encoding="UTF-8" ?><PayoneerToken><Token>http://payouts.sandbox.payoneer.com/partners/lp.aspx?token=b8e8eab41931475cb4b66b54996a7cb1A9A9579049</Token></PayoneerToken>
|
47
|
+
http_version:
|
48
|
+
recorded_at: Mon, 05 May 2014 02:17:44 GMT
|
49
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx?mname=GetToken&p1=<PAYONEER_USERNAME>&p10=True&p2=<PAYONEER_PASSWORD>&p3=<PAYONEER_PARTNER_ID>&p4=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache, no-store, must-revalidate
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=utf-8
|
27
|
+
Expires:
|
28
|
+
- '-1'
|
29
|
+
Set-Cookie:
|
30
|
+
- ASP.NET_SessionId=raxqfh3k5kbm3ks4j5snh003; domain=.sandbox.payoneer.com;
|
31
|
+
path=/; secure; HttpOnly
|
32
|
+
- pid=<PAYONEER_PARTNER_ID>; domain=.sandbox.payoneer.com; expires=Mon, 04-May-2015 02:17:49
|
33
|
+
GMT; path=/; secure
|
34
|
+
P3p:
|
35
|
+
- CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
36
|
+
X-Powered-By:
|
37
|
+
- ASP.NET
|
38
|
+
Date:
|
39
|
+
- Mon, 05 May 2014 02:17:49 GMT
|
40
|
+
Content-Length:
|
41
|
+
- '186'
|
42
|
+
Connection:
|
43
|
+
- Keep-Alive
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: <?xml version="1.0" encoding="UTF-8" ?><PayoneerToken><Token>http://payouts.sandbox.payoneer.com/partners/lp.aspx?token=b8e8eab41931475cb4b66b54996a7cb1A9A9579049</Token></PayoneerToken>
|
47
|
+
http_version:
|
48
|
+
recorded_at: Mon, 05 May 2014 02:17:52 GMT
|
49
|
+
recorded_with: VCR 2.9.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx?mname=GetToken&p1=
|
5
|
+
uri: https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx?mname=GetToken&p1=<PAYONEER_USERNAME>&p10=True&p2=<PAYONEER_PASSWORD>&p3=<PAYONEER_PARTNER_ID>&p4=1
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -27,23 +27,23 @@ http_interactions:
|
|
27
27
|
Expires:
|
28
28
|
- '-1'
|
29
29
|
Set-Cookie:
|
30
|
-
- ASP.NET_SessionId=
|
30
|
+
- ASP.NET_SessionId=buegcdrbhtthhpulxw0c3pcu; domain=.sandbox.payoneer.com;
|
31
31
|
path=/; secure; HttpOnly
|
32
|
-
- pid
|
32
|
+
- pid=<PAYONEER_PARTNER_ID>; domain=.sandbox.payoneer.com; expires=Fri, 01-May-2015 09:39:04
|
33
33
|
GMT; path=/; secure
|
34
34
|
P3p:
|
35
35
|
- CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
36
36
|
X-Powered-By:
|
37
37
|
- ASP.NET
|
38
38
|
Date:
|
39
|
-
- Fri, 02 May 2014
|
39
|
+
- Fri, 02 May 2014 09:39:04 GMT
|
40
40
|
Content-Length:
|
41
|
-
- '
|
41
|
+
- '186'
|
42
42
|
Connection:
|
43
43
|
- Keep-Alive
|
44
44
|
body:
|
45
45
|
encoding: UTF-8
|
46
|
-
string: http://payouts.sandbox.payoneer.com/partners/lp.aspx?token=b8e8eab41931475cb4b66b54996a7cb1A9A9579049
|
46
|
+
string: <?xml version="1.0" encoding="UTF-8" ?><PayoneerToken><Token>http://payouts.sandbox.payoneer.com/partners/lp.aspx?token=b8e8eab41931475cb4b66b54996a7cb1A9A9579049</Token></PayoneerToken>
|
47
47
|
http_version:
|
48
|
-
recorded_at: Fri, 02 May 2014
|
48
|
+
recorded_at: Fri, 02 May 2014 09:39:01 GMT
|
49
49
|
recorded_with: VCR 2.9.0
|
data/spec/fixtures/vcr_cassettes/PayoneerApi_API_Payees/_payee_signup_url/returns_payoneer_token.yml
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx?mname=GetToken&p1=<PAYONEER_USERNAME>&p10=True&p2=<PAYONEER_PASSWORD>&p3=<PAYONEER_PARTNER_ID>&p4=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache, no-store, must-revalidate
|
23
|
+
Pragma:
|
24
|
+
- no-cache
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=utf-8
|
27
|
+
Expires:
|
28
|
+
- '-1'
|
29
|
+
Set-Cookie:
|
30
|
+
- ASP.NET_SessionId=lvpjhq01yrmll0k4xwqxfr4j; domain=.sandbox.payoneer.com;
|
31
|
+
path=/; secure; HttpOnly
|
32
|
+
- pid=<PAYONEER_PARTNER_ID>; domain=.sandbox.payoneer.com; expires=Mon, 04-May-2015 02:17:39
|
33
|
+
GMT; path=/; secure
|
34
|
+
P3p:
|
35
|
+
- CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
|
36
|
+
X-Powered-By:
|
37
|
+
- ASP.NET
|
38
|
+
Date:
|
39
|
+
- Mon, 05 May 2014 02:17:39 GMT
|
40
|
+
Content-Length:
|
41
|
+
- '186'
|
42
|
+
Connection:
|
43
|
+
- Keep-Alive
|
44
|
+
body:
|
45
|
+
encoding: UTF-8
|
46
|
+
string: <?xml version="1.0" encoding="UTF-8" ?><PayoneerToken><Token>http://payouts.sandbox.payoneer.com/partners/lp.aspx?token=b8e8eab41931475cb4b66b54996a7cb1A9A9579049</Token></PayoneerToken>
|
47
|
+
http_version:
|
48
|
+
recorded_at: Mon, 05 May 2014 02:17:40 GMT
|
49
|
+
recorded_with: VCR 2.9.0
|