paypal-payment 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (245) hide show
  1. data/.gitignore +19 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +18 -0
  4. data/Guardfile +24 -0
  5. data/README.rdoc +107 -0
  6. data/Rakefile +5 -0
  7. data/docs/AdaptivePayments.rdoc +84 -0
  8. data/docs/PP_NVPAPI_DeveloperGuide.pdf +0 -0
  9. data/docs/PP_WPP_IntegrationGuide.pdf +0 -0
  10. data/docs/adaptive_payments.md +55 -0
  11. data/docs/api.txt +67 -0
  12. data/docs/design.txt +38 -0
  13. data/docs/express_checkout.md +172 -0
  14. data/docs/requirements.txt +32 -0
  15. data/lib/paypal-payment.rb +10 -0
  16. data/lib/paypal/adaptive_payments.rb +31 -0
  17. data/lib/paypal/adaptive_payments/api.rb +51 -0
  18. data/lib/paypal/adaptive_payments/base.rb +11 -0
  19. data/lib/paypal/adaptive_payments/client_details.rb +14 -0
  20. data/lib/paypal/adaptive_payments/display_options.rb +10 -0
  21. data/lib/paypal/adaptive_payments/funding_constraint.rb +11 -0
  22. data/lib/paypal/adaptive_payments/funding_type_info.rb +8 -0
  23. data/lib/paypal/adaptive_payments/funding_type_list.rb +11 -0
  24. data/lib/paypal/adaptive_payments/initiating_entity.rb +11 -0
  25. data/lib/paypal/adaptive_payments/institution_customer.rb +13 -0
  26. data/lib/paypal/adaptive_payments/invoice_data.rb +13 -0
  27. data/lib/paypal/adaptive_payments/invoice_item.rb +11 -0
  28. data/lib/paypal/adaptive_payments/payment.rb +105 -0
  29. data/lib/paypal/adaptive_payments/payment_info.rb +18 -0
  30. data/lib/paypal/adaptive_payments/payment_info_list.rb +11 -0
  31. data/lib/paypal/adaptive_payments/payment_options.rb +39 -0
  32. data/lib/paypal/adaptive_payments/phone.rb +9 -0
  33. data/lib/paypal/adaptive_payments/preapproval.rb +52 -0
  34. data/lib/paypal/adaptive_payments/receiver.rb +17 -0
  35. data/lib/paypal/adaptive_payments/receiver_list.rb +49 -0
  36. data/lib/paypal/adaptive_payments/receiver_options.rb +19 -0
  37. data/lib/paypal/adaptive_payments/request.rb +51 -0
  38. data/lib/paypal/adaptive_payments/response.rb +38 -0
  39. data/lib/paypal/adaptive_payments/response/address.rb +13 -0
  40. data/lib/paypal/adaptive_payments/response/address_list.rb +11 -0
  41. data/lib/paypal/adaptive_payments/response/base_address.rb +13 -0
  42. data/lib/paypal/adaptive_payments/response/details.rb +19 -0
  43. data/lib/paypal/adaptive_payments/response/error_list.rb +15 -0
  44. data/lib/paypal/adaptive_payments/response/pay.rb +31 -0
  45. data/lib/paypal/adaptive_payments/response/pay_error.rb +16 -0
  46. data/lib/paypal/adaptive_payments/response/pay_error_list.rb +15 -0
  47. data/lib/paypal/adaptive_payments/response/pay_options.rb +7 -0
  48. data/lib/paypal/adaptive_payments/response/preapproval.rb +47 -0
  49. data/lib/paypal/adaptive_payments/response/refund.rb +16 -0
  50. data/lib/paypal/adaptive_payments/response/refund_info.rb +24 -0
  51. data/lib/paypal/adaptive_payments/response/refund_info_list.rb +11 -0
  52. data/lib/paypal/adaptive_payments/response/shipping_address.rb +11 -0
  53. data/lib/paypal/adaptive_payments/sender_identifier.rb +7 -0
  54. data/lib/paypal/adaptive_payments/sender_options.rb +8 -0
  55. data/lib/paypal/api.rb +94 -0
  56. data/lib/paypal/cacert.pem +3987 -0
  57. data/lib/paypal/common.rb +11 -0
  58. data/lib/paypal/common/base.rb +83 -0
  59. data/lib/paypal/common/error_data.rb +15 -0
  60. data/lib/paypal/common/request.rb +45 -0
  61. data/lib/paypal/common/request_envelope.rb +13 -0
  62. data/lib/paypal/common/response.rb +34 -0
  63. data/lib/paypal/common/response_envelope.rb +19 -0
  64. data/lib/paypal/express_checkout.rb +19 -0
  65. data/lib/paypal/express_checkout/account.rb +16 -0
  66. data/lib/paypal/express_checkout/api.rb +43 -0
  67. data/lib/paypal/express_checkout/base.rb +37 -0
  68. data/lib/paypal/express_checkout/billing.rb +7 -0
  69. data/lib/paypal/express_checkout/callback.rb +17 -0
  70. data/lib/paypal/express_checkout/checkout.rb +144 -0
  71. data/lib/paypal/express_checkout/fields.rb +449 -0
  72. data/lib/paypal/express_checkout/fmf.rb +7 -0
  73. data/lib/paypal/express_checkout/payment.rb +76 -0
  74. data/lib/paypal/express_checkout/payment_item.rb +7 -0
  75. data/lib/paypal/express_checkout/recurring.rb +131 -0
  76. data/lib/paypal/express_checkout/request.rb +212 -0
  77. data/lib/paypal/express_checkout/response.rb +52 -0
  78. data/lib/paypal/express_checkout/response/account.rb +30 -0
  79. data/lib/paypal/express_checkout/response/address.rb +29 -0
  80. data/lib/paypal/express_checkout/response/authorization.rb +25 -0
  81. data/lib/paypal/express_checkout/response/base.rb +125 -0
  82. data/lib/paypal/express_checkout/response/callback_request.rb +10 -0
  83. data/lib/paypal/express_checkout/response/callback_response.rb +8 -0
  84. data/lib/paypal/express_checkout/response/capture.rb +14 -0
  85. data/lib/paypal/express_checkout/response/checkout.rb +11 -0
  86. data/lib/paypal/express_checkout/response/details.rb +35 -0
  87. data/lib/paypal/express_checkout/response/manage_profile.rb +9 -0
  88. data/lib/paypal/express_checkout/response/notification.rb +85 -0
  89. data/lib/paypal/express_checkout/response/payment.rb +24 -0
  90. data/lib/paypal/express_checkout/response/profile.rb +58 -0
  91. data/lib/paypal/express_checkout/response/reference.rb +11 -0
  92. data/lib/paypal/express_checkout/response/refund.rb +13 -0
  93. data/lib/paypal/express_checkout/response/search.rb +33 -0
  94. data/lib/paypal/express_checkout/response/transaction_details.rb +11 -0
  95. data/lib/paypal/express_checkout/shipping_option.rb +7 -0
  96. data/lib/paypal/express_checkout/utils.rb +26 -0
  97. data/lib/paypal/express_checkout/version.rb +10 -0
  98. data/lib/paypal/invoice.rb +22 -0
  99. data/lib/paypal/invoice/api.rb +51 -0
  100. data/lib/paypal/invoice/base.rb +11 -0
  101. data/lib/paypal/invoice/base_address.rb +11 -0
  102. data/lib/paypal/invoice/business_info.rb +17 -0
  103. data/lib/paypal/invoice/date_range.rb +8 -0
  104. data/lib/paypal/invoice/invoice.rb +117 -0
  105. data/lib/paypal/invoice/invoice_details.rb +38 -0
  106. data/lib/paypal/invoice/invoice_item.rb +13 -0
  107. data/lib/paypal/invoice/invoice_item_list.rb +10 -0
  108. data/lib/paypal/invoice/invoice_summary.rb +22 -0
  109. data/lib/paypal/invoice/invoice_summary_list.rb +10 -0
  110. data/lib/paypal/invoice/other_payment_details.rb +13 -0
  111. data/lib/paypal/invoice/payment_details.rb +16 -0
  112. data/lib/paypal/invoice/paypal_payment_details.rb +11 -0
  113. data/lib/paypal/invoice/request.rb +43 -0
  114. data/lib/paypal/invoice/response.rb +27 -0
  115. data/lib/paypal/invoice/response/details.rb +23 -0
  116. data/lib/paypal/invoice/response/invoice.rb +10 -0
  117. data/lib/paypal/invoice/response/search.rb +15 -0
  118. data/lib/paypal/invoice/search.rb +19 -0
  119. data/lib/paypal/invoice/search_parameters.rb +20 -0
  120. data/lib/paypal/permissions.rb +12 -0
  121. data/lib/paypal/permissions/api.rb +60 -0
  122. data/lib/paypal/permissions/base.rb +11 -0
  123. data/lib/paypal/permissions/permission.rb +33 -0
  124. data/lib/paypal/permissions/personal_data.rb +17 -0
  125. data/lib/paypal/permissions/request.rb +52 -0
  126. data/lib/paypal/permissions/response.rb +24 -0
  127. data/lib/paypal/permissions/response/permission.rb +14 -0
  128. data/lib/paypal/permissions/response/personal_data.rb +8 -0
  129. data/lib/paypal/permissions/response/token.rb +10 -0
  130. data/lib/paypal/permissions/token.rb +13 -0
  131. data/lib/paypal/recurring.rb +110 -0
  132. data/lib/paypal/request.rb +82 -0
  133. data/lib/paypal/version.rb +8 -0
  134. data/paypal-payment.gemspec +30 -0
  135. data/spec/fixtures/adaptive_payments/payment/create/failure.yml +62 -0
  136. data/spec/fixtures/adaptive_payments/payment/create/success.yml +58 -0
  137. data/spec/fixtures/adaptive_payments/payment/details/success.yml +113 -0
  138. data/spec/fixtures/adaptive_payments/payment/pay/failure.yml +62 -0
  139. data/spec/fixtures/adaptive_payments/payment/pay/preapproval.yml +58 -0
  140. data/spec/fixtures/adaptive_payments/payment/pay/success.yml +58 -0
  141. data/spec/fixtures/adaptive_payments/payment/pay/with_pay_key.yml +58 -0
  142. data/spec/fixtures/adaptive_payments/payment/refund/failure.yml +62 -0
  143. data/spec/fixtures/adaptive_payments/payment/refund/success.yml +58 -0
  144. data/spec/fixtures/adaptive_payments/payment/shipping_addresses/success.yml +113 -0
  145. data/spec/fixtures/adaptive_payments/payment_options/get/success.yml +174 -0
  146. data/spec/fixtures/adaptive_payments/payment_options/set/success.yml +113 -0
  147. data/spec/fixtures/adaptive_payments/preapproval/create/success.yml +58 -0
  148. data/spec/fixtures/adaptive_payments/preapproval/details/success.yml +168 -0
  149. data/spec/fixtures/express_checkout/account/balance/success.yml +32 -0
  150. data/spec/fixtures/express_checkout/account/pal_details/success.yml +32 -0
  151. data/spec/fixtures/express_checkout/checkout/checkout/sales/success.yml +61 -0
  152. data/spec/fixtures/express_checkout/checkout/checkout/success.yml +32 -0
  153. data/spec/fixtures/express_checkout/checkout/details/failure.yml +32 -0
  154. data/spec/fixtures/express_checkout/checkout/details/success.yml +61 -0
  155. data/spec/fixtures/express_checkout/checkout/pay/sales/success.yml +61 -0
  156. data/spec/fixtures/express_checkout/checkout/pay/success.yml +61 -0
  157. data/spec/fixtures/express_checkout/payment/details/failure.yml +32 -0
  158. data/spec/fixtures/express_checkout/payment/details/success.yml +32 -0
  159. data/spec/fixtures/express_checkout/payment/refund/failure.yml +32 -0
  160. data/spec/fixtures/express_checkout/payment/refund/success.yml +32 -0
  161. data/spec/fixtures/express_checkout/payment/search/success.yml +32 -0
  162. data/spec/fixtures/express_checkout/recurring/cancel/failure.yml +32 -0
  163. data/spec/fixtures/express_checkout/recurring/cancel/success.yml +32 -0
  164. data/spec/fixtures/express_checkout/recurring/checkout/success.yml +32 -0
  165. data/spec/fixtures/express_checkout/recurring/create_profile/failure.yml +32 -0
  166. data/spec/fixtures/express_checkout/recurring/create_profile/success.yml +61 -0
  167. data/spec/fixtures/express_checkout/recurring/profile/failure.yml +32 -0
  168. data/spec/fixtures/express_checkout/recurring/profile/success.yml +32 -0
  169. data/spec/fixtures/express_checkout/recurring/reactivate/failure.yml +32 -0
  170. data/spec/fixtures/express_checkout/recurring/reactivate/success.yml +32 -0
  171. data/spec/fixtures/express_checkout/recurring/suspend/failure.yml +32 -0
  172. data/spec/fixtures/express_checkout/recurring/suspend/success.yml +32 -0
  173. data/spec/fixtures/express_checkout/recurring/update_profile/failure.yml +32 -0
  174. data/spec/fixtures/express_checkout/recurring/update_profile/profile.yml +32 -0
  175. data/spec/fixtures/express_checkout/recurring/update_profile/success.yml +32 -0
  176. data/spec/fixtures/invoice/cancel/success.yml +174 -0
  177. data/spec/fixtures/invoice/create/failure.yml +62 -0
  178. data/spec/fixtures/invoice/create/success.yml +60 -0
  179. data/spec/fixtures/invoice/create_and_send/failure.yml +62 -0
  180. data/spec/fixtures/invoice/create_and_send/success.yml +60 -0
  181. data/spec/fixtures/invoice/details/success.yml +117 -0
  182. data/spec/fixtures/invoice/mark_as_paid/failure.yml +180 -0
  183. data/spec/fixtures/invoice/mark_as_paid/success.yml +174 -0
  184. data/spec/fixtures/invoice/mark_as_refunded/success.yml +174 -0
  185. data/spec/fixtures/invoice/mark_as_unpaid/success.yml +231 -0
  186. data/spec/fixtures/invoice/search/success.yml +174 -0
  187. data/spec/fixtures/invoice/send/success.yml +117 -0
  188. data/spec/fixtures/invoice/update/failure.yml +119 -0
  189. data/spec/fixtures/invoice/update/success.yml +117 -0
  190. data/spec/fixtures/ipn/express_checkout.json +35 -0
  191. data/spec/fixtures/ipn/recurring_payment.json +44 -0
  192. data/spec/fixtures/ipn/recurring_payment_profile_created.json +31 -0
  193. data/spec/fixtures/ipn/recurring_payment_profile_created_with_initial_amount.json +33 -0
  194. data/spec/fixtures/ipn/recurring_payment_skipped.json +30 -0
  195. data/spec/fixtures/ipn/recurring_payment_with_initial_amount.json +44 -0
  196. data/spec/fixtures/notification/failure.yml +50 -0
  197. data/spec/fixtures/notification/success.yml +50 -0
  198. data/spec/paypal/adaptive_payments/api_spec.rb +20 -0
  199. data/spec/paypal/adaptive_payments/payment/base_spec.rb +28 -0
  200. data/spec/paypal/adaptive_payments/payment/create_spec.rb +63 -0
  201. data/spec/paypal/adaptive_payments/payment/details_spec.rb +34 -0
  202. data/spec/paypal/adaptive_payments/payment/pay_spec.rb +97 -0
  203. data/spec/paypal/adaptive_payments/payment/refund_spec.rb +49 -0
  204. data/spec/paypal/adaptive_payments/payment/shipping_addresses_spec.rb +30 -0
  205. data/spec/paypal/adaptive_payments/payment_options/get_spec.rb +33 -0
  206. data/spec/paypal/adaptive_payments/payment_options/set_spec.rb +66 -0
  207. data/spec/paypal/adaptive_payments/preapproval/cancel_spec.rb +34 -0
  208. data/spec/paypal/adaptive_payments/preapproval/create_spec.rb +39 -0
  209. data/spec/paypal/adaptive_payments/preapproval/details_spec.rb +34 -0
  210. data/spec/paypal/adaptive_payments/request_spec.rb +48 -0
  211. data/spec/paypal/api_spec.rb +78 -0
  212. data/spec/paypal/common/base_spec.rb +157 -0
  213. data/spec/paypal/common/error_data_spec.rb +0 -0
  214. data/spec/paypal/common/request_envelope_spec.rb +6 -0
  215. data/spec/paypal/common/response_spec.rb +0 -0
  216. data/spec/paypal/express_checkout/account/balance_spec.rb +25 -0
  217. data/spec/paypal/express_checkout/account/pal_details_spec.rb +20 -0
  218. data/spec/paypal/express_checkout/checkout/checkout_spec.rb +73 -0
  219. data/spec/paypal/express_checkout/checkout/details_spec.rb +70 -0
  220. data/spec/paypal/express_checkout/checkout/pay_spec.rb +68 -0
  221. data/spec/paypal/express_checkout/fields_spec.rb +138 -0
  222. data/spec/paypal/express_checkout/payment/refund_spec.rb +34 -0
  223. data/spec/paypal/express_checkout/payment/search_spec.rb +24 -0
  224. data/spec/paypal/express_checkout/payment/transaction_details_spec.rb +30 -0
  225. data/spec/paypal/express_checkout/payment_spec.rb +13 -0
  226. data/spec/paypal/express_checkout/recurring/create_profile_spec.rb +50 -0
  227. data/spec/paypal/express_checkout/recurring/manage_profile_spec.rb +62 -0
  228. data/spec/paypal/express_checkout/recurring/profile_spec.rb +44 -0
  229. data/spec/paypal/express_checkout/recurring/update_profile_spec.rb +50 -0
  230. data/spec/paypal/express_checkout/request_spec.rb +221 -0
  231. data/spec/paypal/express_checkout/response/account_spec.rb +33 -0
  232. data/spec/paypal/express_checkout/response/base_spec.rb +253 -0
  233. data/spec/paypal/invoice/cancel_spec.rb +38 -0
  234. data/spec/paypal/invoice/create_and_send_spec.rb +58 -0
  235. data/spec/paypal/invoice/create_spec.rb +58 -0
  236. data/spec/paypal/invoice/details_spec.rb +39 -0
  237. data/spec/paypal/invoice/mark_as_paid_spec.rb +75 -0
  238. data/spec/paypal/invoice/mark_as_refunded_spec.rb +47 -0
  239. data/spec/paypal/invoice/mark_as_unpaid_spec.rb +43 -0
  240. data/spec/paypal/invoice/search_spec.rb +70 -0
  241. data/spec/paypal/invoice/send_spec.rb +48 -0
  242. data/spec/paypal/invoice/update_spec.rb +72 -0
  243. data/spec/paypal/request_spec.rb +45 -0
  244. data/spec/spec_helper.rb +35 -0
  245. metadata +546 -0
@@ -0,0 +1,174 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://svcs.sandbox.paypal.com/AdaptivePayments/get_payment_options
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{\"payKey\":\"AP-9814311890247774Y\",\"requestEnvelope\":{\"errorLanguage\":\"en_US\",\"detailLevel\":\"ReturnAll\"}}"
9
+ headers:
10
+ User-Agent:
11
+ - PayPal::Payment/0.1.0
12
+ X-Paypal-Security-Userid:
13
+ - chardy_api1.gmail.com
14
+ X-Paypal-Security-Password:
15
+ - "8DTSWBZC7GDR3T4X"
16
+ X-Paypal-Security-Signature:
17
+ - AG-8mOpuFhFyFOYHlaTUYn3Syf15AWJKRnfHMVsmCtC3DK51-ENEPqLS
18
+ X-Paypal-Request-Data-Format:
19
+ - JSON
20
+ X-Paypal-Response-Data-Format:
21
+ - JSON
22
+ X-Paypal-Application-Id:
23
+ - APP-80W284485P519543T
24
+ response:
25
+ status:
26
+ code: 500
27
+ message: Internal Server Error
28
+ headers:
29
+ Date:
30
+ - Mon, 07 Jan 2013 09:10:24 GMT
31
+ Server:
32
+ - Apache-Coyote/1.1
33
+ Cache-Control:
34
+ - no-cache
35
+ X-Ebay-Soa-Request-Id:
36
+ - 13c14466-aa10-a486-d630-a7f0ffc745ea!AdaptivePayments!10.72.109.99![]
37
+ X-Paypal-Operation-Name:
38
+ - get_payment_options
39
+ X-Paypal-Service-Name:
40
+ - "{http://svcs.paypal.com/types/ap}AdaptivePayments"
41
+ X-Ebay-Soa-Message-Protocol:
42
+ - NONE
43
+ X-Ebay-Soa-Response-Data-Format:
44
+ - JSON
45
+ X-Paypal-Service-Version:
46
+ - 1.0.0
47
+ X-Paypal-Error-Response:
48
+ - "TRUE"
49
+ Content-Type:
50
+ - application/json;charset=UTF-8
51
+ Content-Length:
52
+ - "63"
53
+ Set-Cookie:
54
+ - Apache=10.72.109.11.1357549824672150; path=/; expires=Wed, 31-Dec-42 09:10:24 GMT
55
+ Vary:
56
+ - Accept-Encoding
57
+ Connection:
58
+ - close
59
+ body:
60
+ encoding: ASCII-8BIT
61
+ string: Internal server error. Please check the server logs for details
62
+ http_version:
63
+ recorded_at: Mon, 07 Jan 2013 09:10:24 GMT
64
+ - request:
65
+ method: post
66
+ uri: https://svcs.sandbox.paypal.com/AdaptivePayments/Pay
67
+ body:
68
+ encoding: UTF-8
69
+ string: "{\"receiverList\":{\"receiver\":[{\"email\":\"chardy_1345003248_per@gmail.com\",\"amount\":40.0}]},\"currencyCode\":\"USD\",\"cancelUrl\":\"http://example.com/cancel\",\"returnUrl\":\"http://example.com/thank_you\",\"actionType\":\"CREATE\",\"requestEnvelope\":{\"errorLanguage\":\"en_US\",\"detailLevel\":\"ReturnAll\"}}"
70
+ headers:
71
+ User-Agent:
72
+ - PayPal::Payment/0.1.0
73
+ X-Paypal-Security-Userid:
74
+ - chardy_api1.gmail.com
75
+ X-Paypal-Security-Password:
76
+ - "8DTSWBZC7GDR3T4X"
77
+ X-Paypal-Security-Signature:
78
+ - AG-8mOpuFhFyFOYHlaTUYn3Syf15AWJKRnfHMVsmCtC3DK51-ENEPqLS
79
+ X-Paypal-Request-Data-Format:
80
+ - JSON
81
+ X-Paypal-Response-Data-Format:
82
+ - JSON
83
+ X-Paypal-Application-Id:
84
+ - APP-80W284485P519543T
85
+ response:
86
+ status:
87
+ code: 200
88
+ message: OK
89
+ headers:
90
+ Date:
91
+ - Mon, 07 Jan 2013 15:17:19 GMT
92
+ Server:
93
+ - Apache-Coyote/1.1
94
+ X-Ebay-Soa-Request-Id:
95
+ - 13c15965-27b0-a486-d630-a7f0ffc72525!AdaptivePayments!10.72.109.99![]
96
+ X-Paypal-Operation-Name:
97
+ - Pay
98
+ X-Paypal-Service-Name:
99
+ - "{http://svcs.paypal.com/types/ap}AdaptivePayments"
100
+ X-Ebay-Soa-Message-Protocol:
101
+ - NONE
102
+ X-Ebay-Soa-Response-Data-Format:
103
+ - JSON
104
+ X-Paypal-Service-Version:
105
+ - 1.0.0
106
+ Content-Type:
107
+ - application/json;charset=UTF-8
108
+ Set-Cookie:
109
+ - Apache=10.72.109.11.1357571838581694; path=/; expires=Wed, 31-Dec-42 15:17:18 GMT
110
+ Vary:
111
+ - Accept-Encoding
112
+ Transfer-Encoding:
113
+ - chunked
114
+ body:
115
+ encoding: ASCII-8BIT
116
+ string: "{\"responseEnvelope\":{\"timestamp\":\"2013-01-07T07:17:19.378-08:00\",\"ack\":\"Success\",\"correlationId\":\"8b15b273e88cd\",\"build\":\"4110101\"},\"payKey\":\"AP-48L49333WV3886250\",\"paymentExecStatus\":\"CREATED\"}"
117
+ http_version:
118
+ recorded_at: Mon, 07 Jan 2013 15:17:19 GMT
119
+ - request:
120
+ method: post
121
+ uri: https://svcs.sandbox.paypal.com/AdaptivePayments/GetPaymentOptions
122
+ body:
123
+ encoding: UTF-8
124
+ string: "{\"payKey\":\"AP-48L49333WV3886250\",\"requestEnvelope\":{\"errorLanguage\":\"en_US\",\"detailLevel\":\"ReturnAll\"}}"
125
+ headers:
126
+ User-Agent:
127
+ - PayPal::Payment/0.1.0
128
+ X-Paypal-Security-Userid:
129
+ - chardy_api1.gmail.com
130
+ X-Paypal-Security-Password:
131
+ - "8DTSWBZC7GDR3T4X"
132
+ X-Paypal-Security-Signature:
133
+ - AG-8mOpuFhFyFOYHlaTUYn3Syf15AWJKRnfHMVsmCtC3DK51-ENEPqLS
134
+ X-Paypal-Request-Data-Format:
135
+ - JSON
136
+ X-Paypal-Response-Data-Format:
137
+ - JSON
138
+ X-Paypal-Application-Id:
139
+ - APP-80W284485P519543T
140
+ response:
141
+ status:
142
+ code: 200
143
+ message: OK
144
+ headers:
145
+ Date:
146
+ - Mon, 07 Jan 2013 15:17:21 GMT
147
+ Server:
148
+ - Apache-Coyote/1.1
149
+ X-Ebay-Soa-Request-Id:
150
+ - 13c15965-cea0-a486-d630-a7f0ffc72523!AdaptivePayments!10.72.109.99![]
151
+ X-Paypal-Operation-Name:
152
+ - GetPaymentOptions
153
+ X-Paypal-Service-Name:
154
+ - "{http://svcs.paypal.com/types/ap}AdaptivePayments"
155
+ X-Ebay-Soa-Message-Protocol:
156
+ - NONE
157
+ X-Ebay-Soa-Response-Data-Format:
158
+ - JSON
159
+ X-Paypal-Service-Version:
160
+ - 1.0.0
161
+ Content-Type:
162
+ - application/json;charset=UTF-8
163
+ Set-Cookie:
164
+ - Apache=10.72.109.11.1357571841252989; path=/; expires=Wed, 31-Dec-42 15:17:21 GMT
165
+ Vary:
166
+ - Accept-Encoding
167
+ Transfer-Encoding:
168
+ - chunked
169
+ body:
170
+ encoding: ASCII-8BIT
171
+ string: "{\"responseEnvelope\":{\"timestamp\":\"2013-01-07T07:17:21.791-08:00\",\"ack\":\"Success\",\"correlationId\":\"526349eae8652\",\"build\":\"4110101\"}}"
172
+ http_version:
173
+ recorded_at: Mon, 07 Jan 2013 15:17:22 GMT
174
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,113 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://svcs.sandbox.paypal.com/AdaptivePayments/Pay
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{\"receiverList\":{\"receiver\":[{\"email\":\"chardy_1345003248_per@gmail.com\",\"amount\":40.0}]},\"currencyCode\":\"USD\",\"cancelUrl\":\"http://example.com/cancel\",\"returnUrl\":\"http://example.com/thank_you\",\"actionType\":\"CREATE\",\"requestEnvelope\":{\"errorLanguage\":\"en_US\",\"detailLevel\":\"ReturnAll\"}}"
9
+ headers:
10
+ User-Agent:
11
+ - PayPal::Payment/0.1.0
12
+ X-Paypal-Security-Userid:
13
+ - chardy_api1.gmail.com
14
+ X-Paypal-Security-Password:
15
+ - "8DTSWBZC7GDR3T4X"
16
+ X-Paypal-Security-Signature:
17
+ - AG-8mOpuFhFyFOYHlaTUYn3Syf15AWJKRnfHMVsmCtC3DK51-ENEPqLS
18
+ X-Paypal-Request-Data-Format:
19
+ - JSON
20
+ X-Paypal-Response-Data-Format:
21
+ - JSON
22
+ X-Paypal-Application-Id:
23
+ - APP-80W284485P519543T
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Mon, 07 Jan 2013 04:22:35 GMT
31
+ Server:
32
+ - Apache-Coyote/1.1
33
+ X-Ebay-Soa-Request-Id:
34
+ - 13c133ee-73b0-a486-d630-a7f0ffc769ba!AdaptivePayments!10.72.109.99![]
35
+ X-Paypal-Operation-Name:
36
+ - Pay
37
+ X-Paypal-Service-Name:
38
+ - "{http://svcs.paypal.com/types/ap}AdaptivePayments"
39
+ X-Ebay-Soa-Message-Protocol:
40
+ - NONE
41
+ X-Ebay-Soa-Response-Data-Format:
42
+ - JSON
43
+ X-Paypal-Service-Version:
44
+ - 1.0.0
45
+ Content-Type:
46
+ - application/json;charset=UTF-8
47
+ Set-Cookie:
48
+ - Apache=10.72.109.11.1357532555061677; path=/; expires=Wed, 31-Dec-42 04:22:35 GMT
49
+ Vary:
50
+ - Accept-Encoding
51
+ Transfer-Encoding:
52
+ - chunked
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: "{\"responseEnvelope\":{\"timestamp\":\"2013-01-06T20:22:35.842-08:00\",\"ack\":\"Success\",\"correlationId\":\"bfde00f46711a\",\"build\":\"4110101\"},\"payKey\":\"AP-6JR76948P48937118\",\"paymentExecStatus\":\"CREATED\"}"
56
+ http_version:
57
+ recorded_at: Mon, 07 Jan 2013 04:22:36 GMT
58
+ - request:
59
+ method: post
60
+ uri: https://svcs.sandbox.paypal.com/AdaptivePayments/SetPaymentOptions
61
+ body:
62
+ encoding: UTF-8
63
+ string: "{\"payKey\":\"AP-6JR76948P48937118\",\"displayOptions\":{\"emailHeaderImageUrl\":\"http://example.com/email_header.png\",\"emailMarketingImageUrl\":\"http://example.com/email_marketing.png\",\"businessName\":\"Dynosoft\"},\"senderOptions\":{\"requireShippingAddressSelection\":false,\"referrerCode\":\"RRRR\"},\"receiverOptions\":[{\"description\":\"Testing\",\"customerId\":\"CUST_A\",\"invoiceData\":{\"item\":[{\"name\":\"Item A\",\"identifier\":\"AA\",\"price\":30.0,\"itemPrice\":15.0,\"itemCount\":2}],\"totalTax\":10.0,\"totalShipping\":0.0},\"receiver\":{\"email\":\"chardy_1345003248_per@gmail.com\"}}],\"requestEnvelope\":{\"errorLanguage\":\"en_US\",\"detailLevel\":\"ReturnAll\"}}"
64
+ headers:
65
+ User-Agent:
66
+ - PayPal::Payment/0.1.0
67
+ X-Paypal-Security-Userid:
68
+ - chardy_api1.gmail.com
69
+ X-Paypal-Security-Password:
70
+ - "8DTSWBZC7GDR3T4X"
71
+ X-Paypal-Security-Signature:
72
+ - AG-8mOpuFhFyFOYHlaTUYn3Syf15AWJKRnfHMVsmCtC3DK51-ENEPqLS
73
+ X-Paypal-Request-Data-Format:
74
+ - JSON
75
+ X-Paypal-Response-Data-Format:
76
+ - JSON
77
+ X-Paypal-Application-Id:
78
+ - APP-80W284485P519543T
79
+ response:
80
+ status:
81
+ code: 200
82
+ message: OK
83
+ headers:
84
+ Date:
85
+ - Mon, 07 Jan 2013 04:22:37 GMT
86
+ Server:
87
+ - Apache-Coyote/1.1
88
+ X-Ebay-Soa-Request-Id:
89
+ - 13c133ee-f5f0-a486-d630-a7f0ffc769b9!AdaptivePayments!10.72.109.99![]
90
+ X-Paypal-Operation-Name:
91
+ - SetPaymentOptions
92
+ X-Paypal-Service-Name:
93
+ - "{http://svcs.paypal.com/types/ap}AdaptivePayments"
94
+ X-Ebay-Soa-Message-Protocol:
95
+ - NONE
96
+ X-Ebay-Soa-Response-Data-Format:
97
+ - JSON
98
+ X-Paypal-Service-Version:
99
+ - 1.0.0
100
+ Content-Type:
101
+ - application/json;charset=UTF-8
102
+ Set-Cookie:
103
+ - Apache=10.72.109.11.1357532557145931; path=/; expires=Wed, 31-Dec-42 04:22:37 GMT
104
+ Vary:
105
+ - Accept-Encoding
106
+ Transfer-Encoding:
107
+ - chunked
108
+ body:
109
+ encoding: ASCII-8BIT
110
+ string: "{\"responseEnvelope\":{\"timestamp\":\"2013-01-06T20:22:37.739-08:00\",\"ack\":\"Success\",\"correlationId\":\"18f4414d67942\",\"build\":\"4110101\"}}"
111
+ http_version:
112
+ recorded_at: Mon, 07 Jan 2013 04:22:38 GMT
113
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,58 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://svcs.sandbox.paypal.com/AdaptivePayments/Preapproval
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{\"clientDetails\":{\"ipAddress\":\"234.8.8.18\",\"deviceId\":\"123456\",\"applicationId\":\"PP\"},\"startingDate\":\"2013-01-18T00:00:00Z\",\"currencyCode\":\"USD\",\"maxTotalAmountOfAllPayments\":2000.0,\"cancelUrl\":\"http://example.com/cancel\",\"returnUrl\":\"http://example.com/return\",\"requestEnvelope\":{\"errorLanguage\":\"en_US\",\"detailLevel\":\"ReturnAll\"}}"
9
+ headers:
10
+ User-Agent:
11
+ - PayPal::Payment/0.1.0
12
+ X-Paypal-Security-Userid:
13
+ - chardy_api1.gmail.com
14
+ X-Paypal-Security-Password:
15
+ - "8DTSWBZC7GDR3T4X"
16
+ X-Paypal-Security-Signature:
17
+ - AG-8mOpuFhFyFOYHlaTUYn3Syf15AWJKRnfHMVsmCtC3DK51-ENEPqLS
18
+ X-Paypal-Request-Data-Format:
19
+ - JSON
20
+ X-Paypal-Response-Data-Format:
21
+ - JSON
22
+ X-Paypal-Application-Id:
23
+ - APP-80W284485P519543T
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Fri, 18 Jan 2013 03:39:09 GMT
31
+ Server:
32
+ - Apache-Coyote/1.1
33
+ X-Ebay-Soa-Request-Id:
34
+ - 13c4bbd1-8ec0-a486-d636-a986fff995af!AdaptivePayments!10.72.109.99![]
35
+ X-Paypal-Operation-Name:
36
+ - Preapproval
37
+ X-Paypal-Service-Name:
38
+ - "{http://svcs.paypal.com/types/ap}AdaptivePayments"
39
+ X-Ebay-Soa-Message-Protocol:
40
+ - NONE
41
+ X-Ebay-Soa-Response-Data-Format:
42
+ - JSON
43
+ X-Paypal-Service-Version:
44
+ - 1.0.0
45
+ Content-Type:
46
+ - application/json;charset=UTF-8
47
+ Set-Cookie:
48
+ - Apache=10.72.109.11.1358480349414819; path=/; expires=Sun, 11-Jan-43 03:39:09 GMT
49
+ Vary:
50
+ - Accept-Encoding
51
+ Transfer-Encoding:
52
+ - chunked
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: "{\"responseEnvelope\":{\"timestamp\":\"2013-01-17T19:39:09.712-08:00\",\"ack\":\"Success\",\"correlationId\":\"fed3a974b72bc\",\"build\":\"4923149\"},\"preapprovalKey\":\"PA-89578182UL033944H\"}"
56
+ http_version:
57
+ recorded_at: Fri, 18 Jan 2013 03:39:09 GMT
58
+ recorded_with: VCR 2.3.0
@@ -0,0 +1,168 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://svcs.sandbox.paypal.com/AdaptivePayments/CancelPreapproval
6
+ body:
7
+ encoding: UTF-8
8
+ string: "{\"preapprovalKey\":\"PA-8XG728465U8814621\",\"requestEnvelope\":{\"errorLanguage\":\"en_US\",\"detailLevel\":\"ReturnAll\"}}"
9
+ headers:
10
+ User-Agent:
11
+ - PayPal::Payment/0.1.0
12
+ X-Paypal-Security-Userid:
13
+ - chardy_api1.gmail.com
14
+ X-Paypal-Security-Password:
15
+ - "8DTSWBZC7GDR3T4X"
16
+ X-Paypal-Security-Signature:
17
+ - AG-8mOpuFhFyFOYHlaTUYn3Syf15AWJKRnfHMVsmCtC3DK51-ENEPqLS
18
+ X-Paypal-Request-Data-Format:
19
+ - JSON
20
+ X-Paypal-Response-Data-Format:
21
+ - JSON
22
+ X-Paypal-Application-Id:
23
+ - APP-80W284485P519543T
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Date:
30
+ - Mon, 07 Jan 2013 16:37:05 GMT
31
+ Server:
32
+ - Apache-Coyote/1.1
33
+ X-Ebay-Soa-Request-Id:
34
+ - 13c15df5-cbb0-a486-d630-a7f0ffc71d8d!AdaptivePayments!10.72.109.99![]
35
+ X-Paypal-Operation-Name:
36
+ - CancelPreapproval
37
+ X-Paypal-Service-Name:
38
+ - "{http://svcs.paypal.com/types/ap}AdaptivePayments"
39
+ X-Ebay-Soa-Message-Protocol:
40
+ - NONE
41
+ X-Ebay-Soa-Response-Data-Format:
42
+ - JSON
43
+ X-Paypal-Service-Version:
44
+ - 1.0.0
45
+ Content-Type:
46
+ - application/json;charset=UTF-8
47
+ Set-Cookie:
48
+ - Apache=10.72.109.11.1357576625333265; path=/; expires=Wed, 31-Dec-42 16:37:05 GMT
49
+ Vary:
50
+ - Accept-Encoding
51
+ Transfer-Encoding:
52
+ - chunked
53
+ body:
54
+ encoding: ASCII-8BIT
55
+ string: "{\"responseEnvelope\":{\"timestamp\":\"2013-01-07T08:37:05.613-08:00\",\"ack\":\"Success\",\"correlationId\":\"b9c88ed07bef5\",\"build\":\"4110101\"}}"
56
+ http_version:
57
+ recorded_at: Mon, 07 Jan 2013 16:37:05 GMT
58
+ - request:
59
+ method: post
60
+ uri: https://svcs.sandbox.paypal.com/AdaptivePayments/Preapproval
61
+ body:
62
+ encoding: UTF-8
63
+ string: "{\"clientDetails\":{\"ipAddress\":\"234.8.8.18\",\"deviceId\":\"123456\",\"applicationId\":\"PP\"},\"startingDate\":\"2013-01-08T00:00:00Z\",\"currencyCode\":\"USD\",\"maxTotalAmountOfAllPayments\":2000.0,\"cancelUrl\":\"http://example.com/cancel\",\"returnUrl\":\"http://example.com/return\",\"requestEnvelope\":{\"errorLanguage\":\"en_US\",\"detailLevel\":\"ReturnAll\"}}"
64
+ headers:
65
+ User-Agent:
66
+ - PayPal::Payment/0.1.0
67
+ X-Paypal-Security-Userid:
68
+ - chardy_api1.gmail.com
69
+ X-Paypal-Security-Password:
70
+ - "8DTSWBZC7GDR3T4X"
71
+ X-Paypal-Security-Signature:
72
+ - AG-8mOpuFhFyFOYHlaTUYn3Syf15AWJKRnfHMVsmCtC3DK51-ENEPqLS
73
+ X-Paypal-Request-Data-Format:
74
+ - JSON
75
+ X-Paypal-Response-Data-Format:
76
+ - JSON
77
+ X-Paypal-Application-Id:
78
+ - APP-80W284485P519543T
79
+ response:
80
+ status:
81
+ code: 200
82
+ message: OK
83
+ headers:
84
+ Date:
85
+ - Mon, 07 Jan 2013 16:37:42 GMT
86
+ Server:
87
+ - Apache-Coyote/1.1
88
+ X-Ebay-Soa-Request-Id:
89
+ - 13c15dfe-b260-a486-d630-a7f0ffc71d7b!AdaptivePayments!10.72.109.99![]
90
+ X-Paypal-Operation-Name:
91
+ - Preapproval
92
+ X-Paypal-Service-Name:
93
+ - "{http://svcs.paypal.com/types/ap}AdaptivePayments"
94
+ X-Ebay-Soa-Message-Protocol:
95
+ - NONE
96
+ X-Ebay-Soa-Response-Data-Format:
97
+ - JSON
98
+ X-Paypal-Service-Version:
99
+ - 1.0.0
100
+ Content-Type:
101
+ - application/json;charset=UTF-8
102
+ Set-Cookie:
103
+ - Apache=10.72.109.11.1357576661792524; path=/; expires=Wed, 31-Dec-42 16:37:41 GMT
104
+ Vary:
105
+ - Accept-Encoding
106
+ Transfer-Encoding:
107
+ - chunked
108
+ body:
109
+ encoding: ASCII-8BIT
110
+ string: "{\"responseEnvelope\":{\"timestamp\":\"2013-01-07T08:37:42.137-08:00\",\"ack\":\"Success\",\"correlationId\":\"0f87d64870946\",\"build\":\"4110101\"},\"preapprovalKey\":\"PA-85D74798TX339002G\"}"
111
+ http_version:
112
+ recorded_at: Mon, 07 Jan 2013 16:37:42 GMT
113
+ - request:
114
+ method: post
115
+ uri: https://svcs.sandbox.paypal.com/AdaptivePayments/PreapprovalDetails
116
+ body:
117
+ encoding: UTF-8
118
+ string: "{\"preapprovalKey\":\"PA-85D74798TX339002G\",\"requestEnvelope\":{\"errorLanguage\":\"en_US\",\"detailLevel\":\"ReturnAll\"}}"
119
+ headers:
120
+ User-Agent:
121
+ - PayPal::Payment/0.1.0
122
+ X-Paypal-Security-Userid:
123
+ - chardy_api1.gmail.com
124
+ X-Paypal-Security-Password:
125
+ - "8DTSWBZC7GDR3T4X"
126
+ X-Paypal-Security-Signature:
127
+ - AG-8mOpuFhFyFOYHlaTUYn3Syf15AWJKRnfHMVsmCtC3DK51-ENEPqLS
128
+ X-Paypal-Request-Data-Format:
129
+ - JSON
130
+ X-Paypal-Response-Data-Format:
131
+ - JSON
132
+ X-Paypal-Application-Id:
133
+ - APP-80W284485P519543T
134
+ response:
135
+ status:
136
+ code: 200
137
+ message: OK
138
+ headers:
139
+ Date:
140
+ - Mon, 07 Jan 2013 16:37:43 GMT
141
+ Server:
142
+ - Apache-Coyote/1.1
143
+ X-Ebay-Soa-Request-Id:
144
+ - 13c15dff-0dc0-a486-d630-a7f0ffc71d7a!AdaptivePayments!10.72.109.99![]
145
+ X-Paypal-Operation-Name:
146
+ - PreapprovalDetails
147
+ X-Paypal-Service-Name:
148
+ - "{http://svcs.paypal.com/types/ap}AdaptivePayments"
149
+ X-Ebay-Soa-Message-Protocol:
150
+ - NONE
151
+ X-Ebay-Soa-Response-Data-Format:
152
+ - JSON
153
+ X-Paypal-Service-Version:
154
+ - 1.0.0
155
+ Content-Type:
156
+ - application/json;charset=UTF-8
157
+ Set-Cookie:
158
+ - Apache=10.72.109.11.1357576663254228; path=/; expires=Wed, 31-Dec-42 16:37:43 GMT
159
+ Vary:
160
+ - Accept-Encoding
161
+ Transfer-Encoding:
162
+ - chunked
163
+ body:
164
+ encoding: ASCII-8BIT
165
+ string: "{\"responseEnvelope\":{\"timestamp\":\"2013-01-07T08:37:43.545-08:00\",\"ack\":\"Success\",\"correlationId\":\"ed9ef039712bd\",\"build\":\"4110101\"},\"approved\":\"false\",\"cancelUrl\":\"http:\\/\\/example.com\\/cancel\",\"curPayments\":\"0\",\"curPaymentsAmount\":\"0.00\",\"curPeriodAttempts\":\"0\",\"currencyCode\":\"USD\",\"dateOfMonth\":\"0\",\"dayOfWeek\":\"NO_DAY_SPECIFIED\",\"maxTotalAmountOfAllPayments\":\"2000.00\",\"paymentPeriod\":\"NO_PERIOD_SPECIFIED\",\"pinType\":\"NOT_REQUIRED\",\"returnUrl\":\"http:\\/\\/example.com\\/return\",\"startingDate\":\"2013-01-08T00:00:00.000Z\",\"status\":\"ACTIVE\",\"displayMaxTotalAmount\":\"false\"}"
166
+ http_version:
167
+ recorded_at: Mon, 07 Jan 2013 16:37:43 GMT
168
+ recorded_with: VCR 2.3.0