picpay 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 110a7b0f34b578bde0cf748d8023580e2ffc9586b3f26c9d323d7de004ef59d4
4
- data.tar.gz: 891a49abe15eb3ab287f1fda62f9f1856dd300e8d9c8ebde10890c0ae3884304
3
+ metadata.gz: f19ed79a504873218b6d8df17aa4d14e0a1c54dc54e73c0c0bb0b23d56e24216
4
+ data.tar.gz: 8ebeb4a9dbb79a1c066f1e7056deb8885ca5522f5a3dcda3b36a0e98b0ddeb1b
5
5
  SHA512:
6
- metadata.gz: f7b4e4f6799605a8dc7c90d3c198917123690a3608cc099db5ee8261d953d59c1ca2b081df79c1dcb9c7b9234c27f0ff30e26ae0b2454f4c407e95a84aae57b2
7
- data.tar.gz: 59c0214ecc56128217e1107cc1b0116b3253b5dec5b00262abd6309b970685d43bb55e9689310192c39e4c08ac887e40dc810942203720c55899162a5fb9460e
6
+ metadata.gz: a84d80f7ddf389ace23d1d2168a615e4e096e19eb18541a029bc9a66d253fcfa8067cb7b7ebcde1c966499127e85ef2d2d7248efeaece3644a673d883c32df63
7
+ data.tar.gz: '059385e456636e27db3c94646db4dee33d3c4c4f262425afd1dc3389c355cf77161529250837c05a36b34e2dd07a5f24754b3d26d5c05d91651179c5c952eb59'
data/.gitignore CHANGED
@@ -10,6 +10,8 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
 
13
+ picpay-0.1.0.gem
14
+
13
15
  # Editor directories and files
14
16
  .idea
15
17
  .vscode
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # PicPay - E-commerce Public API
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/picpay.svg)](https://badge.fury.io/rb/picpay)
3
4
  [![Build Status](https://travis-ci.org/gilcierweb/picpay.svg?branch=master)](https://travis-ci.org/gilcierweb/picpay)
4
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/8ae01e6d34f3aaf85132/maintainability)](https://codeclimate.com/github/gilcierweb/picpay/maintainability)
5
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/8ae01e6d34f3aaf85132/test_coverage)](https://codeclimate.com/github/gilcierweb/picpay/test_coverage)
@@ -53,16 +54,33 @@ picpay.expires_at = '11/11/2022' # optional
53
54
 
54
55
  # Payment Request
55
56
  payment_request = picpay.payments()
57
+ payment_request.status
58
+ # => 200
59
+ payment_request.headers
60
+ # => {"server"=>"app.picpay.com", "content-type"=>"application/json; charset=utf-8"...
61
+ payment_request.body
62
+ # => "{referenceId: "102030"...
56
63
 
57
64
  reference_id = '102030'
58
65
  authorization_id = '555008cef7f321d00ef236333'
59
66
 
60
67
  #Payment Cancellation
61
68
  payment_cancellation = picpay.payments_cancellations(reference_id, authorization_id)
69
+ payment_cancellation.status
70
+ # => 200
71
+ payment_cancellation.headers
72
+ # => {"server"=>"app.picpay.com", "content-type"=>"application/json; charset=utf-8"...
73
+ payment_cancellation.body
74
+ # => "{referenceId: "102030"...
62
75
 
63
76
  # Payment Status
64
77
  payment_status = picpay.payments_status(reference_id)
65
-
78
+ payment_status.status
79
+ # => 200
80
+ payment_status.headers
81
+ # => {"server"=>"app.picpay.com", "content-type"=>"application/json; charset=utf-8"...
82
+ payment_status.body
83
+ # => "{referenceId: "102030"...
66
84
  ```
67
85
 
68
86
  ## Example of Payment Request (JSON)
@@ -88,7 +106,7 @@ payment_status = picpay.payments_status(reference_id)
88
106
  }
89
107
  ```
90
108
 
91
- ## Example of Payment Reponse (JSON)
109
+ ## Example of Payment Response (JSON)
92
110
 
93
111
  ```json
94
112
  {
@@ -116,7 +134,7 @@ payment_status = picpay.payments_status(reference_id)
116
134
  }
117
135
  ```
118
136
 
119
- ## Example of Payment Cancellation Reponse (JSON)
137
+ ## Example of Payment Cancellation Response (JSON)
120
138
 
121
139
  ```json
122
140
  {
@@ -134,7 +152,7 @@ payment_status = picpay.payments_status(reference_id)
134
152
  get https://appws.picpay.com/ecommerce/public/payments/{referenceId}/status
135
153
  ```
136
154
 
137
- ## Example of Payment Status Reponse (JSON)
155
+ ## Example of Payment Status Response (JSON)
138
156
 
139
157
  ```json
140
158
  {
@@ -150,7 +168,7 @@ get https://appws.picpay.com/ecommerce/public/payments/{referenceId}/status
150
168
  ```shell
151
169
  post http://www.sualoja.com.br/callback
152
170
  ```
153
- ## Example of Payment Notification Reponse (JSON)
171
+ ## Example of Payment Notification Response (JSON)
154
172
 
155
173
  ```json
156
174
  {
@@ -25,7 +25,6 @@ module Picpay
25
25
 
26
26
  def payments
27
27
  begin
28
- puts api_url
29
28
  response = Faraday.post(api_url, data_payment, headers)
30
29
  response
31
30
  rescue Faraday::Error::ConnectionFailed => error
@@ -1,3 +1,3 @@
1
1
  module Picpay
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - gilcierweb
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-18 00:00:00.000000000 Z
11
+ date: 2019-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler