pagseguro-sdk 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. checksums.yaml +7 -0
  2. data/.github/.gitignore +204 -0
  3. data/.github/ISSUE_TEMPLATE/relatorio-de-bug.md +29 -0
  4. data/.github/workflows/codacy-analysis.yml +46 -0
  5. data/.gitignore +28 -0
  6. data/.rspec +1 -0
  7. data/.travis.yml +13 -0
  8. data/CHANGELOG.md +95 -0
  9. data/CONTRIBUTING.md +39 -0
  10. data/Dockerfile +20 -0
  11. data/Gemfile +2 -0
  12. data/LICENSE-2.0.txt +177 -0
  13. data/README.md +436 -0
  14. data/Rakefile +5 -0
  15. data/docker-compose.yml +5 -0
  16. data/docs/transparent_checkout.md +201 -0
  17. data/examples/authorization/create_authorization.rb +32 -0
  18. data/examples/authorization/create_authorization_with_account.rb +56 -0
  19. data/examples/authorization/search/search_authorization_by_code.rb +29 -0
  20. data/examples/authorization/search/search_authorization_by_date.rb +35 -0
  21. data/examples/authorization/search/search_authorization_by_notification_code.rb +29 -0
  22. data/examples/authorization/search/search_authorization_by_reference.rb +31 -0
  23. data/examples/boot.rb +26 -0
  24. data/examples/checkout/create_payment_request.rb +63 -0
  25. data/examples/checkout/search/search_abandoned_transactions.rb +41 -0
  26. data/examples/checkout/search/search_transaction_by_code.rb +76 -0
  27. data/examples/checkout/search/search_transaction_by_notification_code.rb +76 -0
  28. data/examples/checkout/search/search_transaction_by_reference.rb +36 -0
  29. data/examples/checkout/search/search_transactions_by_date.rb +45 -0
  30. data/examples/create_session.rb +19 -0
  31. data/examples/direct/create_transaction_using_boleto.rb +100 -0
  32. data/examples/direct/create_transaction_using_credit_card.rb +128 -0
  33. data/examples/direct/create_transaction_using_online_debit.rb +104 -0
  34. data/examples/get_installments.rb +40 -0
  35. data/examples/preapproval/cancel_preapproval.rb +26 -0
  36. data/examples/preapproval/change_preapproval_payment.rb +50 -0
  37. data/examples/preapproval/change_preapproval_status.rb +29 -0
  38. data/examples/preapproval/charge_preapproval.rb +36 -0
  39. data/examples/preapproval/create_preapproval.rb +68 -0
  40. data/examples/preapproval/create_preapproval_auto.rb +53 -0
  41. data/examples/preapproval/create_preapproval_discount.rb +30 -0
  42. data/examples/preapproval/create_preapproval_manual.rb +58 -0
  43. data/examples/preapproval/create_preapproval_transparent.rb +41 -0
  44. data/examples/preapproval/preapproval_retry.rb +29 -0
  45. data/examples/preapproval/search/search_by_date_interval.rb +45 -0
  46. data/examples/preapproval/search/search_by_days_interval.rb +46 -0
  47. data/examples/preapproval/search/search_by_notification_code.rb +50 -0
  48. data/examples/preapproval/search/search_by_subscription_code.rb +50 -0
  49. data/examples/preapproval/search/search_subscription_payment_orders.rb +53 -0
  50. data/examples/request_transaction_cancellation.rb +19 -0
  51. data/examples/split_payment/create_authorization.rb +32 -0
  52. data/examples/split_payment/create_payment_request.rb +71 -0
  53. data/examples/split_payment/create_transaction_using_boleto.rb +118 -0
  54. data/examples/split_payment/create_transaction_using_credit_card.rb +152 -0
  55. data/lib/pagseguro-oficial.rb +1 -0
  56. data/lib/pagseguro.rb +221 -0
  57. data/lib/pagseguro/account.rb +29 -0
  58. data/lib/pagseguro/account_credentials.rb +14 -0
  59. data/lib/pagseguro/address.rb +40 -0
  60. data/lib/pagseguro/application_credentials.rb +18 -0
  61. data/lib/pagseguro/authorization.rb +61 -0
  62. data/lib/pagseguro/authorization/collection.rb +28 -0
  63. data/lib/pagseguro/authorization/request_serializer.rb +24 -0
  64. data/lib/pagseguro/authorization/response.rb +49 -0
  65. data/lib/pagseguro/authorization/response_serializer.rb +40 -0
  66. data/lib/pagseguro/authorization_request.rb +84 -0
  67. data/lib/pagseguro/authorization_request/request_serializer.rb +142 -0
  68. data/lib/pagseguro/authorization_request/response.rb +26 -0
  69. data/lib/pagseguro/authorization_request/response_serializer.rb +18 -0
  70. data/lib/pagseguro/bank.rb +8 -0
  71. data/lib/pagseguro/boleto_transaction_request.rb +8 -0
  72. data/lib/pagseguro/company.rb +41 -0
  73. data/lib/pagseguro/config.rb +34 -0
  74. data/lib/pagseguro/credit_card_transaction_request.rb +39 -0
  75. data/lib/pagseguro/creditor_fee.rb +23 -0
  76. data/lib/pagseguro/document.rb +23 -0
  77. data/lib/pagseguro/documents.rb +5 -0
  78. data/lib/pagseguro/errors.rb +57 -0
  79. data/lib/pagseguro/exceptions.rb +3 -0
  80. data/lib/pagseguro/extensions/collection_object.rb +34 -0
  81. data/lib/pagseguro/extensions/credentiable.rb +17 -0
  82. data/lib/pagseguro/extensions/ensure_type.rb +9 -0
  83. data/lib/pagseguro/extensions/mass_assignment.rb +11 -0
  84. data/lib/pagseguro/holder.rb +36 -0
  85. data/lib/pagseguro/installment.rb +57 -0
  86. data/lib/pagseguro/installment/collection.rb +25 -0
  87. data/lib/pagseguro/installment/request_serializer.rb +24 -0
  88. data/lib/pagseguro/installment/response.rb +37 -0
  89. data/lib/pagseguro/installment/response_serializer.rb +22 -0
  90. data/lib/pagseguro/item.rb +34 -0
  91. data/lib/pagseguro/items.rb +23 -0
  92. data/lib/pagseguro/manual_subscription_charger.rb +59 -0
  93. data/lib/pagseguro/manual_subscription_charger/request_serializer.rb +50 -0
  94. data/lib/pagseguro/manual_subscription_charger/response.rb +36 -0
  95. data/lib/pagseguro/manual_subscription_charger/response_serializer.rb +17 -0
  96. data/lib/pagseguro/notification.rb +11 -0
  97. data/lib/pagseguro/notification/authorization.rb +15 -0
  98. data/lib/pagseguro/notification/transaction.rb +15 -0
  99. data/lib/pagseguro/online_debit_transaction_request.rb +17 -0
  100. data/lib/pagseguro/partner.rb +20 -0
  101. data/lib/pagseguro/payment_method.rb +39 -0
  102. data/lib/pagseguro/payment_release.rb +21 -0
  103. data/lib/pagseguro/payment_releases.rb +28 -0
  104. data/lib/pagseguro/payment_request.rb +117 -0
  105. data/lib/pagseguro/payment_request/request_serializer.rb +203 -0
  106. data/lib/pagseguro/payment_request/response.rb +35 -0
  107. data/lib/pagseguro/payment_status.rb +39 -0
  108. data/lib/pagseguro/permission.rb +13 -0
  109. data/lib/pagseguro/person.rb +40 -0
  110. data/lib/pagseguro/phone.rb +20 -0
  111. data/lib/pagseguro/phones.rb +5 -0
  112. data/lib/pagseguro/receiver.rb +20 -0
  113. data/lib/pagseguro/receiver_split.rb +15 -0
  114. data/lib/pagseguro/request.rb +170 -0
  115. data/lib/pagseguro/sender.rb +53 -0
  116. data/lib/pagseguro/session.rb +34 -0
  117. data/lib/pagseguro/session/response.rb +32 -0
  118. data/lib/pagseguro/session/response_serializer.rb +18 -0
  119. data/lib/pagseguro/shipping.rb +57 -0
  120. data/lib/pagseguro/subscription.rb +132 -0
  121. data/lib/pagseguro/subscription/request_serializer.rb +129 -0
  122. data/lib/pagseguro/subscription/response.rb +49 -0
  123. data/lib/pagseguro/subscription/response_serializer.rb +62 -0
  124. data/lib/pagseguro/subscription/subscription_search.rb +135 -0
  125. data/lib/pagseguro/subscription_canceller.rb +30 -0
  126. data/lib/pagseguro/subscription_canceller/response.rb +34 -0
  127. data/lib/pagseguro/subscription_change_payment.rb +46 -0
  128. data/lib/pagseguro/subscription_change_payment/request_serializer.rb +80 -0
  129. data/lib/pagseguro/subscription_change_payment/response.rb +26 -0
  130. data/lib/pagseguro/subscription_change_status.rb +50 -0
  131. data/lib/pagseguro/subscription_change_status/request_serializer.rb +28 -0
  132. data/lib/pagseguro/subscription_change_status/response.rb +26 -0
  133. data/lib/pagseguro/subscription_discount.rb +41 -0
  134. data/lib/pagseguro/subscription_discount/request_serializer.rb +34 -0
  135. data/lib/pagseguro/subscription_discount/response.rb +34 -0
  136. data/lib/pagseguro/subscription_payment_method.rb +21 -0
  137. data/lib/pagseguro/subscription_payment_order.rb +57 -0
  138. data/lib/pagseguro/subscription_payment_order/response.rb +37 -0
  139. data/lib/pagseguro/subscription_payment_order/response_serializer.rb +51 -0
  140. data/lib/pagseguro/subscription_plan.rb +69 -0
  141. data/lib/pagseguro/subscription_plan/request_serializer.rb +81 -0
  142. data/lib/pagseguro/subscription_plan/response.rb +36 -0
  143. data/lib/pagseguro/subscription_plan/response_serializer.rb +17 -0
  144. data/lib/pagseguro/subscription_retry.rb +35 -0
  145. data/lib/pagseguro/subscription_retry/response.rb +34 -0
  146. data/lib/pagseguro/subscription_search_payment_orders.rb +131 -0
  147. data/lib/pagseguro/subscription_transaction.rb +29 -0
  148. data/lib/pagseguro/subscription_transactions.rb +5 -0
  149. data/lib/pagseguro/transaction.rb +215 -0
  150. data/lib/pagseguro/transaction/collection.rb +20 -0
  151. data/lib/pagseguro/transaction/response.rb +45 -0
  152. data/lib/pagseguro/transaction/search.rb +121 -0
  153. data/lib/pagseguro/transaction/search/search_abandoned.rb +20 -0
  154. data/lib/pagseguro/transaction/search/search_by_date.rb +16 -0
  155. data/lib/pagseguro/transaction/search/search_by_reference.rb +13 -0
  156. data/lib/pagseguro/transaction/serializer.rb +181 -0
  157. data/lib/pagseguro/transaction_cancellation.rb +37 -0
  158. data/lib/pagseguro/transaction_cancellation/request_serializer.rb +18 -0
  159. data/lib/pagseguro/transaction_cancellation/response.rb +33 -0
  160. data/lib/pagseguro/transaction_cancellation/response_serializer.rb +17 -0
  161. data/lib/pagseguro/transaction_installment.rb +11 -0
  162. data/lib/pagseguro/transaction_refund.rb +44 -0
  163. data/lib/pagseguro/transaction_refund/request_serializer.rb +24 -0
  164. data/lib/pagseguro/transaction_refund/response.rb +33 -0
  165. data/lib/pagseguro/transaction_refund/response_serializer.rb +17 -0
  166. data/lib/pagseguro/transaction_request.rb +165 -0
  167. data/lib/pagseguro/transaction_request/request_serializer.rb +311 -0
  168. data/lib/pagseguro/transaction_request/response.rb +33 -0
  169. data/lib/pagseguro/transaction_request/response_serializer.rb +117 -0
  170. data/lib/pagseguro/transaction_status.rb +14 -0
  171. data/lib/pagseguro/version.rb +3 -0
  172. data/locales/pt-BR.yml +130 -0
  173. data/pagseguro-oficial.gemspec +31 -0
  174. data/spec/fixtures/authorization/find_authorization.xml +17 -0
  175. data/spec/fixtures/authorization/search_authorization.xml +47 -0
  176. data/spec/fixtures/authorization_request/authorization_request.xml +11 -0
  177. data/spec/fixtures/authorization_request/authorization_request_with_account.xml +47 -0
  178. data/spec/fixtures/authorization_request/success.xml +4 -0
  179. data/spec/fixtures/by_date/success.xml +85 -0
  180. data/spec/fixtures/installment/success.xml +24 -0
  181. data/spec/fixtures/invalid_code.xml +7 -0
  182. data/spec/fixtures/manual_subscription_charger/fail.xml +6 -0
  183. data/spec/fixtures/manual_subscription_charger/success.xml +4 -0
  184. data/spec/fixtures/payment_request/failure.xml +7 -0
  185. data/spec/fixtures/payment_request/success.xml +5 -0
  186. data/spec/fixtures/refund/success.xml +2 -0
  187. data/spec/fixtures/session/success.xml +4 -0
  188. data/spec/fixtures/subscription/fail.xml +6 -0
  189. data/spec/fixtures/subscription/find_success.xml +28 -0
  190. data/spec/fixtures/subscription/search_success.xml +18 -0
  191. data/spec/fixtures/subscription/success.xml +4 -0
  192. data/spec/fixtures/subscription_canceller/fail.xml +6 -0
  193. data/spec/fixtures/subscription_change_payment/fail.xml +7 -0
  194. data/spec/fixtures/subscription_change_status/fail.xml +7 -0
  195. data/spec/fixtures/subscription_discount/fail.xml +6 -0
  196. data/spec/fixtures/subscription_payment_order/success.xml +18 -0
  197. data/spec/fixtures/subscription_plan/fail.xml +6 -0
  198. data/spec/fixtures/subscription_plan/success.xml +4 -0
  199. data/spec/fixtures/subscription_retry/fail.xml +7 -0
  200. data/spec/fixtures/subscription_search_payment_orders/success.xml +43 -0
  201. data/spec/fixtures/transaction_cancellation/success.xml +2 -0
  202. data/spec/fixtures/transaction_request/success.xml +58 -0
  203. data/spec/fixtures/transactions/additional.xml +53 -0
  204. data/spec/fixtures/transactions/search.xml +40 -0
  205. data/spec/fixtures/transactions/success.xml +75 -0
  206. data/spec/fixtures/transactions/without_status_and_type.xml +71 -0
  207. data/spec/pagseguro/account_credentials_spec.rb +10 -0
  208. data/spec/pagseguro/account_spec.rb +27 -0
  209. data/spec/pagseguro/address_spec.rb +17 -0
  210. data/spec/pagseguro/application_credentials_spec.rb +11 -0
  211. data/spec/pagseguro/authorization/collection_spec.rb +49 -0
  212. data/spec/pagseguro/authorization/request_serializer_spec.rb +10 -0
  213. data/spec/pagseguro/authorization/response_serializer_spec.rb +19 -0
  214. data/spec/pagseguro/authorization/response_spec.rb +90 -0
  215. data/spec/pagseguro/authorization_request/request_serializer_spec.rb +323 -0
  216. data/spec/pagseguro/authorization_request/response_serializer_spec.rb +15 -0
  217. data/spec/pagseguro/authorization_request/response_spec.rb +36 -0
  218. data/spec/pagseguro/authorization_request_spec.rb +127 -0
  219. data/spec/pagseguro/authorization_spec.rb +111 -0
  220. data/spec/pagseguro/bank_spec.rb +5 -0
  221. data/spec/pagseguro/boleto_transaction_request_spec.rb +9 -0
  222. data/spec/pagseguro/company_spec.rb +12 -0
  223. data/spec/pagseguro/config_spec.rb +5 -0
  224. data/spec/pagseguro/credit_card_transaction_request_spec.rb +36 -0
  225. data/spec/pagseguro/creditor_fee_spec.rb +10 -0
  226. data/spec/pagseguro/document_spec.rb +21 -0
  227. data/spec/pagseguro/documents_spec.rb +37 -0
  228. data/spec/pagseguro/errors_spec.rb +145 -0
  229. data/spec/pagseguro/extensions/collection_object_spec.rb +77 -0
  230. data/spec/pagseguro/features/create_session_spec.rb +52 -0
  231. data/spec/pagseguro/features/create_transaction_request_spec.rb +58 -0
  232. data/spec/pagseguro/holder_spec.rb +10 -0
  233. data/spec/pagseguro/installment/collection_spec.rb +43 -0
  234. data/spec/pagseguro/installment/request_serializer_spec.rb +16 -0
  235. data/spec/pagseguro/installment/response_serializer_spec.rb +33 -0
  236. data/spec/pagseguro/installment/response_spec.rb +56 -0
  237. data/spec/pagseguro/installment_spec.rb +50 -0
  238. data/spec/pagseguro/item_spec.rb +20 -0
  239. data/spec/pagseguro/items_spec.rb +148 -0
  240. data/spec/pagseguro/manual_subscription_charger/request_serializer_spec.rb +79 -0
  241. data/spec/pagseguro/manual_subscription_charger/response_serializer_spec.rb +10 -0
  242. data/spec/pagseguro/manual_subscription_charger/response_spec.rb +65 -0
  243. data/spec/pagseguro/manual_subscription_charger_spec.rb +68 -0
  244. data/spec/pagseguro/notification_spec.rb +6 -0
  245. data/spec/pagseguro/online_debit_transaction_request_spec.rb +18 -0
  246. data/spec/pagseguro/pagseguro_spec.rb +82 -0
  247. data/spec/pagseguro/partner_spec.rb +8 -0
  248. data/spec/pagseguro/payment_method_spec.rb +42 -0
  249. data/spec/pagseguro/payment_release_spec.rb +9 -0
  250. data/spec/pagseguro/payment_releases_spec.rb +34 -0
  251. data/spec/pagseguro/payment_request/request_serializer_spec.rb +283 -0
  252. data/spec/pagseguro/payment_request/response_spec.rb +13 -0
  253. data/spec/pagseguro/payment_request_spec.rb +148 -0
  254. data/spec/pagseguro/payment_status_spec.rb +33 -0
  255. data/spec/pagseguro/permission_spec.rb +7 -0
  256. data/spec/pagseguro/person_spec.rb +10 -0
  257. data/spec/pagseguro/phone_spec.rb +6 -0
  258. data/spec/pagseguro/phones_spec.rb +38 -0
  259. data/spec/pagseguro/receiver_spec.rb +7 -0
  260. data/spec/pagseguro/receiver_split_spec.rb +7 -0
  261. data/spec/pagseguro/request_spec.rb +114 -0
  262. data/spec/pagseguro/sender_spec.rb +25 -0
  263. data/spec/pagseguro/session/response_serializer_spec.rb +12 -0
  264. data/spec/pagseguro/session/response_spec.rb +57 -0
  265. data/spec/pagseguro/session_spec.rb +45 -0
  266. data/spec/pagseguro/shipping_spec.rb +40 -0
  267. data/spec/pagseguro/subscription/request_serializer_spec.rb +233 -0
  268. data/spec/pagseguro/subscription/response_serializer_spec.rb +46 -0
  269. data/spec/pagseguro/subscription/response_spec.rb +79 -0
  270. data/spec/pagseguro/subscription/subscription_search_spec.rb +154 -0
  271. data/spec/pagseguro/subscription_canceller/response_spec.rb +58 -0
  272. data/spec/pagseguro/subscription_canceller_spec.rb +57 -0
  273. data/spec/pagseguro/subscription_change_payment/request_serializer_spec.rb +150 -0
  274. data/spec/pagseguro/subscription_change_payment/response_spec.rb +41 -0
  275. data/spec/pagseguro/subscription_change_payment_spec.rb +60 -0
  276. data/spec/pagseguro/subscription_change_status/request_serializer_spec.rb +19 -0
  277. data/spec/pagseguro/subscription_change_status/response_spec.rb +41 -0
  278. data/spec/pagseguro/subscription_change_status_spec.rb +53 -0
  279. data/spec/pagseguro/subscription_discount/request_serializer_spec.rb +27 -0
  280. data/spec/pagseguro/subscription_discount/response_spec.rb +58 -0
  281. data/spec/pagseguro/subscription_discount_spec.rb +60 -0
  282. data/spec/pagseguro/subscription_payment_method_spec.rb +10 -0
  283. data/spec/pagseguro/subscription_payment_order/response_serializer_spec.rb +24 -0
  284. data/spec/pagseguro/subscription_payment_order/response_spec.rb +55 -0
  285. data/spec/pagseguro/subscription_payment_order_spec.rb +27 -0
  286. data/spec/pagseguro/subscription_plan/request_serializer_spec.rb +253 -0
  287. data/spec/pagseguro/subscription_plan/response_serializer_spec.rb +10 -0
  288. data/spec/pagseguro/subscription_plan/response_spec.rb +65 -0
  289. data/spec/pagseguro/subscription_plan_spec.rb +118 -0
  290. data/spec/pagseguro/subscription_retry/response_spec.rb +58 -0
  291. data/spec/pagseguro/subscription_retry_spec.rb +62 -0
  292. data/spec/pagseguro/subscription_search_payment_order_spec.rb +129 -0
  293. data/spec/pagseguro/subscription_spec.rb +137 -0
  294. data/spec/pagseguro/subscription_transaction_spec.rb +24 -0
  295. data/spec/pagseguro/subscription_transactions_spec.rb +37 -0
  296. data/spec/pagseguro/transaction/collection_spec.rb +43 -0
  297. data/spec/pagseguro/transaction/response_spec.rb +60 -0
  298. data/spec/pagseguro/transaction/search/search_abandoned_spec.rb +55 -0
  299. data/spec/pagseguro/transaction/search/search_by_date_spec.rb +28 -0
  300. data/spec/pagseguro/transaction/search/search_by_reference_spec.rb +21 -0
  301. data/spec/pagseguro/transaction/search_spec.rb +133 -0
  302. data/spec/pagseguro/transaction/serializer_spec.rb +86 -0
  303. data/spec/pagseguro/transaction_cancellation/request_serializer_spec.rb +13 -0
  304. data/spec/pagseguro/transaction_cancellation/response_serializer_spec.rb +9 -0
  305. data/spec/pagseguro/transaction_cancellation/response_spec.rb +45 -0
  306. data/spec/pagseguro/transaction_cancellation_spec.rb +60 -0
  307. data/spec/pagseguro/transaction_installment_spec.rb +6 -0
  308. data/spec/pagseguro/transaction_refund/request_serializer_spec.rb +15 -0
  309. data/spec/pagseguro/transaction_refund/response_serializer_spec.rb +12 -0
  310. data/spec/pagseguro/transaction_refund/response_spec.rb +39 -0
  311. data/spec/pagseguro/transaction_refund_spec.rb +71 -0
  312. data/spec/pagseguro/transaction_request/request_serializer_spec.rb +677 -0
  313. data/spec/pagseguro/transaction_request/response_serializer_spec.rb +52 -0
  314. data/spec/pagseguro/transaction_request/response_spec.rb +63 -0
  315. data/spec/pagseguro/transaction_request_spec.rb +156 -0
  316. data/spec/pagseguro/transaction_spec.rb +265 -0
  317. data/spec/pagseguro/transaction_status_spec.rb +7 -0
  318. data/spec/spec_helper.rb +35 -0
  319. data/spec/support/ensure_type_macro.rb +35 -0
  320. data/spec/support/helpers.rb +14 -0
  321. data/spec/support/mass_assignment_macro.rb +11 -0
  322. data/spec/support/shared_examples_for_configuration.rb +10 -0
  323. data/transaction/transaction_refund.rb +25 -0
  324. metadata +641 -0
@@ -0,0 +1,20 @@
1
+ from ruby:2.2.2
2
+
3
+ env DEBIAN_FRONTEND noninteractive
4
+
5
+ run sed -i '/deb-src/d' /etc/apt/sources.list
6
+ run apt-get update
7
+ run apt-get install -y build-essential
8
+
9
+ workdir /tmp
10
+ copy Gemfile Gemfile
11
+ copy Gemfile.lock Gemfile.lock
12
+ copy pagseguro-oficial.gemspec pagseguro-oficial.gemspec
13
+ run mkdir -p lib/pagseguro
14
+ copy lib/pagseguro/version.rb lib/pagseguro
15
+ run bundle install
16
+
17
+ run mkdir /app
18
+ workdir /app
19
+
20
+ cmd bash
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,436 @@
1
+ # Biblioteca de integração PagSeguro em Ruby
2
+
3
+ [![Build Status](https://travis-ci.org/pagseguro/ruby.svg?branch=master)](https://travis-ci.org/pagseguro/ruby)
4
+ [![Code Climate](https://codeclimate.com/github/pagseguro/ruby/badges/gpa.svg)](https://codeclimate.com/github/pagseguro/ruby)
5
+
6
+ ## Descrição
7
+
8
+ A biblioteca PagSeguro em Ruby é um conjunto de classes de domínio que facilitam, para o desenvolvedor Ruby, a utilização das funcionalidades que o PagSeguro oferece na forma de APIs. Com a biblioteca instalada e configurada, você pode facilmente integrar funcionalidades como:
9
+
10
+ - [Criar Requisições de Pagamentos]
11
+ - [Consultar Transações por Código]
12
+ - [Consultar Transações por Intervalo de Datas]
13
+ - [Receber Notificações]
14
+ - [Estornar Transações por Código]
15
+ - [Cancelar Transações por Código]
16
+
17
+ ## Requisitos
18
+
19
+ - [Ruby] 1.9.3+
20
+ - [Aitch] 0.2.1+
21
+
22
+
23
+ ## Instalação
24
+
25
+ - Adicione a biblioteca ao seu Gemfile.
26
+
27
+ ```ruby
28
+ gem "pagseguro-oficial", "~> 2.5.0"
29
+ ```
30
+
31
+ - Execute o comando `bundle install`.
32
+
33
+ ## Configuração
34
+
35
+ Para fazer a autenticação, você precisará configurar as credenciais do PagSeguro. Crie o arquivo `config/initializers/pagseguro.rb` com o conteúdo abaixo.
36
+
37
+ ```ruby
38
+ PagSeguro.configure do |config|
39
+ config.token = "seu token"
40
+ config.email = "seu e-mail"
41
+ config.environment = :production # ou :sandbox. O padrão é production.
42
+ config.encoding = "UTF-8" # ou ISO-8859-1. O padrão é UTF-8.
43
+ end
44
+ ```
45
+
46
+ O token de segurança está disponível em sua [conta do PagSeguro](https://pagseguro.uol.com.br/integracao/token-de-seguranca.jhtml).
47
+
48
+ ## Pagamentos (API V2)
49
+
50
+ Para iniciar uma requisição de pagamento, você precisa instanciar a classe `PagSeguro::PaymentRequest`. Isso normalmente será feito em seu controller de checkout.
51
+
52
+ ```ruby
53
+ class CheckoutController < ApplicationController
54
+ def create
55
+ # O modo como você irá armazenar os produtos que estão sendo comprados
56
+ # depende de você. Neste caso, temos um modelo Order que referência os
57
+ # produtos que estão sendo comprados.
58
+ order = Order.find(params[:id])
59
+
60
+ payment = PagSeguro::PaymentRequest.new
61
+
62
+ # Você também pode fazer o request de pagamento usando credenciais
63
+ # diferentes, como no exemplo abaixo
64
+
65
+ payment = PagSeguro::PaymentRequest.new(email: 'abc@email', token: 'token')
66
+
67
+ payment.reference = order.id
68
+ payment.notification_url = notifications_url
69
+ payment.redirect_url = processing_url
70
+
71
+ order.products.each do |product|
72
+ payment.items << {
73
+ id: product.id,
74
+ description: product.title,
75
+ amount: product.price,
76
+ weight: product.weight
77
+ }
78
+ end
79
+
80
+ # Caso você precise passar parâmetros para a api que ainda não foram
81
+ # mapeados na gem, você pode fazer de maneira dinâmica utilizando um
82
+ # simples hash.
83
+ payment.extra_params << { paramName: 'paramValue' }
84
+ payment.extra_params << { senderBirthDate: '07/05/1981' }
85
+ payment.extra_params << { extraAmount: '-15.00' }
86
+
87
+ response = payment.register
88
+
89
+ # Caso o processo de checkout tenha dado errado, lança uma exceção.
90
+ # Assim, um serviço de rastreamento de exceções ou até mesmo a gem
91
+ # exception_notification poderá notificar sobre o ocorrido.
92
+ #
93
+ # Se estiver tudo certo, redireciona o comprador para o PagSeguro.
94
+ if response.errors.any?
95
+ raise response.errors.join("\n")
96
+ else
97
+ redirect_to response.url
98
+ end
99
+ end
100
+ end
101
+ ```
102
+
103
+ ## Notificações (API V3)
104
+
105
+ O PagSeguro irá notificar a URL informada no processo de checkout. Isso é feito através do método `PagSeguro::PaymentRequest#notification_url`. Esta URL irá receber o código da notificação e tipo de notificação. Com estas informações, podemos recuperar as informações detalhadas sobre o pagamento.
106
+
107
+ ```ruby
108
+ class NotificationsController < ApplicationController
109
+ skip_before_filter :verify_authenticity_token, only: :create
110
+
111
+ def create
112
+ transaction = PagSeguro::Transaction.find_by_notification_code(params[:notificationCode])
113
+
114
+ if transaction.errors.empty?
115
+ # Processa a notificação. A melhor maneira de se fazer isso é realizar
116
+ # o processamento em background. Uma boa alternativa para isso é a
117
+ # biblioteca Sidekiq.
118
+ end
119
+
120
+ render nothing: true, status: 200
121
+ end
122
+ end
123
+ ```
124
+
125
+ ## Consultas (API V3)
126
+
127
+ ### Transações abandonadas (API V2)
128
+
129
+ Para quantificar o número de transações abandonadas, você pode solicitar uma lista com histórico dessas transações.
130
+
131
+ ```ruby
132
+ report = PagSeguro::Transaction.find_abandoned
133
+
134
+ while report.next_page?
135
+ report.next_page!
136
+ puts "=> Page #{report.page}"
137
+
138
+ abort "=> Errors: #{report.errors.join("\n")}" unless report.valid?
139
+
140
+ puts "=> Report was created at: #{report.created_at}"
141
+ puts
142
+
143
+ report.transactions.each do |transaction|
144
+ puts "=> Abandoned transaction"
145
+ puts " created at: #{transaction.created_at}"
146
+ puts " code: #{transaction.code}"
147
+ puts " type_id: #{transaction.type_id}"
148
+ puts " gross amount: #{transaction.gross_amount}"
149
+ puts
150
+ end
151
+ end
152
+ ```
153
+
154
+ ### Histórico de transações
155
+
156
+ Para facilitar seu controle financeiro e seu estoque, você pode solicitar uma lista com histórico das transações da sua loja.
157
+
158
+ ```ruby
159
+ report = PagSeguro::Transaction.find_by_date
160
+
161
+ while report.next_page?
162
+ report.next_page!
163
+ puts "== Page #{report.page}"
164
+ abort "=> Errors: #{report.errors.join("\n")}" unless report.valid?
165
+ puts "Report created on #{report.created_at}"
166
+ puts
167
+
168
+ report.transactions.each do |transaction|
169
+ puts "=> Transaction"
170
+ puts " created_at: #{transaction.created_at}"
171
+ puts " code: #{transaction.code}"
172
+ puts " cancellation_source: #{transaction.cancellation_source}"
173
+ puts " payment method: #{transaction.payment_method.type}"
174
+ puts " gross amount: #{transaction.gross_amount}"
175
+ puts " updated at: #{transaction.updated_at}"
176
+ puts
177
+ end
178
+ end
179
+ ```
180
+
181
+ ### Histórico de status de transações
182
+
183
+ É possível consultar o histórico de mudanças de status em transações
184
+
185
+ ```ruby
186
+ response = PagSeguro::Transaction.find_status_history("transaction_code")
187
+
188
+ response.each do |status|
189
+ puts "STATUS:"
190
+ puts " code: #{status.code}"
191
+ puts " date: #{status.date}"
192
+ puts " notification_code: #{status.notification_code}"
193
+ end
194
+ ```
195
+
196
+ ### Consultar opções de parcelamento
197
+
198
+ Você pode consultar as opções de parcelamento para um determinado valor.
199
+
200
+ ```ruby
201
+ installments = PagSeguro::Installment.find("100.00")
202
+
203
+ puts "=> INSTALLMENTS"
204
+ puts
205
+ installments.each do |installment|
206
+ puts installment.inspect
207
+ end
208
+
209
+ visa_installments = PagSeguro::Installment.find("100.00", "visa")
210
+
211
+ puts
212
+ puts "=> VISA INSTALLMENTS"
213
+ puts
214
+ visa_installments.each do |installment|
215
+ puts installment.inspect
216
+ end
217
+ ```
218
+
219
+ ## Modelo de aplicações
220
+
221
+ ### Setando autorizações
222
+
223
+ ```ruby
224
+ options = {
225
+ credentials: PagSeguro::ApplicationCredentials.new("app4521929942", "1D47384E6565EBE664DAEF9AD690438B"),
226
+ permissions: [:searches, :notifications],
227
+ notification_url: 'foo.com.br',
228
+ redirect_url: 'bar.com.br'
229
+ }
230
+ response = PagSeguro::Authorization.new(options).authorize
231
+ ```
232
+ Em seguida, acesse o link para confirmar as autorizações
233
+ ```ruby
234
+ response.url
235
+ ```
236
+
237
+ ### Estorno de Transações
238
+
239
+ Você pode estornar pagamentos que as transações estiverem com status: Paga (3), Disponível (4), Em disputa (5).
240
+
241
+ ```ruby
242
+ refund = PagSeguro::TransactionRefund.new
243
+ refund.transaction_code = "D5D5BE444148407891E497B421975599"
244
+
245
+ response = refund.register
246
+
247
+ if response.errors.any?
248
+ puts response.errors.join("\n")
249
+ else
250
+ puts "=> REFUND RESPONSE"
251
+ puts response.result
252
+ end
253
+ ```
254
+
255
+ ### Cancelamento de Transações
256
+
257
+ Você pode cancelar transações que estiverem com status: Aguardando pagamento ou Em análise.
258
+
259
+ ```ruby
260
+ cancellation = PagSeguro::TransactionCancellation.new
261
+ cancellation.transaction_code = "AFB8FCF29496401681257C1ECE3A98FF"
262
+
263
+ cancellation.register
264
+
265
+ if cancellation.errors.any?
266
+ puts cancellation.errors.join("\n")
267
+ else
268
+ puts "=> CANCELLATION RESPONSE"
269
+ puts cancellation.result
270
+ end
271
+ ```
272
+
273
+ ## API
274
+
275
+ ### PagSeguro::PaymentRequest (utiliza versão V2)
276
+
277
+ #### Definindo identificador do pedido
278
+
279
+ ```ruby
280
+ payment.reference = "ref1234"
281
+ ```
282
+
283
+ #### Definindo informações de entrega
284
+
285
+ ```ruby
286
+ payment = PagSeguro::PaymentRequest.new
287
+ payment.shipping = {
288
+ type_name: "sedex",
289
+ cost: 20.00,
290
+ address: {
291
+ street: "Av. Brig. Faria Lima",
292
+ number: 1384,
293
+ complement: "5 andar",
294
+ district: "Jardim Paulistano",
295
+ city: "São Paulo",
296
+ state: "SP",
297
+ postal_code: "01452002"
298
+ }
299
+ }
300
+ ```
301
+
302
+ #### Alternativamente você pode definir uma instância da classe `PagSeguro::Shipping`
303
+
304
+ ```ruby
305
+ shipping_options = {
306
+ type_name: "sedex",
307
+ cost: 20.00,
308
+ address: {
309
+ street: "Av. Brig. Faria Lima",
310
+ number: 1384,
311
+ complement: "5 andar",
312
+ district: "Jardim Paulistano",
313
+ city: "São Paulo",
314
+ state: "SP",
315
+ postal_code: "01452002"
316
+ }
317
+ }
318
+
319
+ payment.shipping = PagSeguro::Shipping.new(shipping_options)
320
+ ```
321
+
322
+ #### Definindo informações do comprador
323
+
324
+ ```ruby
325
+ payment.sender = {
326
+ name: "John Doe",
327
+ email: "john@example.org",
328
+ cpf: "12345678901",
329
+ phone: {
330
+ area_code: "11",
331
+ number: "123456789"
332
+ }
333
+ }
334
+ ```
335
+
336
+ #### Definindo valores de acréscimo/desconto
337
+
338
+ ```ruby
339
+ payment.extra_amount = 123.45 # acréscimo
340
+ payment.extra_amount = -123.45 # desconto
341
+ ```
342
+
343
+ #### URLS
344
+
345
+ ```ruby
346
+ # URL de notificação
347
+ payment.notification_url = "http://example.org/notifications"
348
+
349
+ # URL de retorno
350
+ payment.return_url = "http://example.org/processando"
351
+ ```
352
+
353
+ #### Definindo tempo de vida do código de pagamento
354
+
355
+ ```ruby
356
+ payment.max_uses = 100
357
+ payment.max_age = 3600 # em segundos
358
+ ```
359
+
360
+ #### Definindo encoding
361
+
362
+ ```ruby
363
+ PagSeguro.encoding = "UTF-8" # UTF-8 ou ISO-8859-1
364
+ ```
365
+
366
+ ## Checkout Transparente
367
+
368
+ Encontre toda a documentação necessária para o checkout transparente aqui:
369
+ https://github.com/pagseguro/ruby/blob/master/docs/transparent_checkout.md
370
+
371
+ ## Docker
372
+
373
+ [Docker](http://www.docker.com/) é uma ferramenta open-source que cria uma
374
+ camada de abstração e automação da virtualização do kernel do
375
+ GNU/Linux[\*](https://en.wikipedia.org/wiki/Docker_(software)).
376
+
377
+ Primeiro certifique-se de que o Docker está instalado e configurado
378
+ corretamente, em seguida construa a imagem:
379
+
380
+ % docker build -t pagseguro .
381
+
382
+ E para entrar na imagem:
383
+
384
+ % docker run --rm -it -v ${PWD}:/app pagseguro
385
+ root@5c480dd6e22a:/app#
386
+
387
+ Ou se preferir você pode usar o
388
+ [docker-compose](https://docs.docker.com/compose/):
389
+
390
+ % docker-compose run script
391
+ root@c6697abac095:/app#
392
+
393
+ ## Dúvidas?
394
+
395
+ Caso tenha dúvidas ou precise de suporte, acesse nosso [fórum].
396
+
397
+
398
+ ## Licença
399
+
400
+ Copyright 2013 PagSeguro Internet LTDA.
401
+
402
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
403
+
404
+ http://www.apache.org/licenses/LICENSE-2.0
405
+
406
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
407
+
408
+ ## Notas
409
+ - O PagSeguro somente aceita pagamento utilizando a moeda Real brasileiro (BRL).
410
+ - Certifique-se que o email e o token informados estejam relacionados a uma conta que possua o perfil de vendedor ou empresarial.
411
+ - Certifique-se que tenha definido corretamente o charset de acordo com a codificação (ISO-8859-1 ou UTF-8) do seu sistema. Isso irá prevenir que as transações gerem possíveis erros ou quebras ou ainda que caracteres especiais possam ser apresentados de maneira diferente do habitual.
412
+ - Para que ocorra normalmente a geração de logs, certifique-se que o diretório e o arquivo de log tenham permissões de leitura e escrita.
413
+
414
+ ## Contribuições
415
+
416
+ Achou e corrigiu um bug ou tem alguma feature em mente e deseja contribuir?
417
+
418
+ * Faça um fork
419
+ * Adicione sua feature ou correção de bug (`git checkout -b my-new-feature`)
420
+ * Commit suas mudanças (`git commit -am 'Added some feature'`)
421
+ * Rode um push para o branch (`git push origin my-new-feature`)
422
+ * Envie um Pull Request
423
+
424
+ O código, os commits e os comentários devem ser em inglês.
425
+ Adicione exemplos para sua nova feature.
426
+ Se seu Pull Request for relacionado a uma versão específica, o Pull Request não deve ser enviado para o branch master e sim para o branch correspondente a versão.
427
+
428
+ [Criar Requisições de Pagamentos]: https://devs.pagseguro.uol.com.br/docs/checkout-web
429
+ [Consultar Transações por Código]: https://devs.pagseguro.uol.com.br/docs/pagamento-recorrente-consulta-pelo-codigo-de-adesao
430
+ [Consultar Transações por Intervalo de Datas]: https://devs.pagseguro.uol.com.br/docs/pagamento-recorrente-consulta-por-intervalo-de-datas
431
+ [Receber Notificações]: https://dev.pagseguro.uol.com.br/docs/api-notificacao-v1
432
+ [Estornar Transações por Código]: https://devs.pagseguro.uol.com.br/docs/checkout-web-cancelamento-e-estorno
433
+ [Cancelar Transações por Código]: https://devs.pagseguro.uol.com.br/docs/pagamento-recorrente-cancelamento-de-adesao
434
+ [fórum]: http://forum.pagseguro.uol.com.br/
435
+ [Ruby]: http://www.ruby-lang.org/pt/
436
+ [Aitch]: https://github.com/fnando/aitch