processing_kz 0.1.41 → 0.1.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/processing_kz/complete_transaction.rb +1 -1
- data/lib/processing_kz/transaction.rb +1 -1
- data/lib/processing_kz/version.rb +1 -1
- data/spec/transaction_spec.rb +21 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e906146729b4b369e9e998f87df2490e1ddd2232
|
4
|
+
data.tar.gz: f25bf8c23234225090f534d5946c51d3de105b72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2f12477722974a3626631b9cb2fdcccf2c4050df951b5c99ead3131aab0f570a22102b68cdf84fa3c84140d7af0719489dc090d1d57be8166969928cafc8f56
|
7
|
+
data.tar.gz: eaf134fc0043d03a0946cace8a9c67be80fcb3a6acad4263bbc1a9986907d7387ce9a023ba363ee47e07e2c7b3a7a7cb9ec4fa69756eed25d5fc25eee2241e37
|
data/README.md
CHANGED
@@ -49,13 +49,15 @@ Next step is to check that money is successfuly blocked on customer's card. Just
|
|
49
49
|
|
50
50
|
Finaly you need to complete transaction to withdraw money from card. Again just pass customer_reference which you obtained during starting transaction.
|
51
51
|
|
52
|
-
ProcessingKz.complete(customer_reference: start.customer_reference)
|
52
|
+
ProcessingKz.complete(customer_reference: start.customer_reference, transaction_success: true)
|
53
53
|
|
54
54
|
Check that everything is alright. You have to get `'PAID'` status.
|
55
55
|
|
56
56
|
transaction = ProcessingKz.get(customer_reference: start.customer_reference)
|
57
57
|
transaction.status #=> 'PAID'
|
58
58
|
|
59
|
+
If you want to decline transaction, pass `false` in transaction_success instead of `true`.
|
60
|
+
|
59
61
|
### List of Goods
|
60
62
|
|
61
63
|
ProcessingKz is requiring list of goods or services for transaction. You can pass one good or array of goods in transaction.
|
@@ -12,7 +12,7 @@ module ProcessingKz
|
|
12
12
|
def initialize(args= {})
|
13
13
|
@merchant_id = args[:merchant_id] || Config.merchant_id
|
14
14
|
@customer_reference = args[:customer_reference]
|
15
|
-
@transaction_success = args[:transaction_success]
|
15
|
+
@transaction_success = args[:transaction_success]
|
16
16
|
@override_amount = args[:override_amount]
|
17
17
|
@goods_list = args[:goods_list]
|
18
18
|
request!
|
data/spec/transaction_spec.rb
CHANGED
@@ -80,4 +80,25 @@ feature 'Transaction' do
|
|
80
80
|
expect(status.transaction_status).to eq('PAID')
|
81
81
|
click_button 'Return'
|
82
82
|
end
|
83
|
+
|
84
|
+
it 'successfuly declines payment process of transaction through coder friendly interface' do
|
85
|
+
start = ProcessingKz.start(order_id: rand(1..1000000), goods_list: @good, return_url: 'http://google.com')
|
86
|
+
visit start.redirect_url
|
87
|
+
fill_in 'panPart1', with: '4012'
|
88
|
+
fill_in 'panPart2', with: '0010'
|
89
|
+
fill_in 'panPart3', with: '3844'
|
90
|
+
fill_in 'panPart4', with: '3335'
|
91
|
+
select '01', from: 'expiryMonth'
|
92
|
+
select '2029', from: 'expiryYear'
|
93
|
+
fill_in 'cardHolder', with: 'MARIA SIDOROVA'
|
94
|
+
fill_in 'cardSecurityCode', with: '123'
|
95
|
+
fill_in 'cardHolderEmail', with: 'test@processing.kz'
|
96
|
+
fill_in 'cardHolderPhone', with: '87011234567'
|
97
|
+
click_button 'Pay'
|
98
|
+
sleep 5
|
99
|
+
ProcessingKz.complete(customer_reference: start.customer_reference, transaction_success: false)
|
100
|
+
status = ProcessingKz.get(customer_reference: start.customer_reference)
|
101
|
+
expect(status.transaction_status).to eq('REVERSED')
|
102
|
+
click_button 'Return'
|
103
|
+
end
|
83
104
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: processing_kz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Tkachenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|