Skip to content

Commit 8a61c33

Browse files
committed
Some readme stuff
1 parent 9bfb517 commit 8a61c33

File tree

1 file changed

+2
-46
lines changed

1 file changed

+2
-46
lines changed

README.textile

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -55,50 +55,6 @@ Such YAML config file can be also placed in Rails config dir (named gopay.yml) -
5555

5656
h2. Usage
5757

58-
<pre>
59-
# first you have to init a payment
60-
payment = GoPay::EshopPayment.new(:variable_symbol => "gopay_test_#{GoPay.configuration.goid}",
61-
:total_price_in_cents => 100,
62-
:product_name => "productName",
63-
:payment_channel => "cz_gp_w"
64-
)
65-
# and request its creation on paygate:
66-
payment.create # =>
67-
# #<GoPay::EshopPayment:0x7fa27c0fab88
68-
# @last_response=
69-
# {:"@xmlns:ns1"=>"urn:AxisEPaymentProvider",
70-
# :total_price=>"100",
71-
# :variable_symbol=>"gopay_test_8531903182",
72-
# :result=>"CALL_COMPLETED",
73-
# :payment_channel=>
74-
# {:"@xsi:type"=>"soapenc:string",
75-
# :"@xmlns:soapenc"=>"http://schemas.xmlsoap.org/soap/encoding/"},
76-
# :eshop_go_id=>"8531903182",
77-
# :session_state=>"WAITING",
78-
# :"@xsi:type"=>"ns1:EPaymentStatus",
79-
# :buyer_go_id=>
80-
# {:"@xsi:type"=>"soapenc:long",
81-
# :"@xmlns:soapenc"=>"http://schemas.xmlsoap.org/soap/encoding/"},
82-
# :product_name=>"productName",
83-
# :payment_session_id=>"3000523838",
84-
# :result_description=>"WAITING",
85-
# :url=>"http://www.failed_url.cz",
86-
# :encrypted_signature=>
87-
# "b653c3b55e981abb29ff9a6b25eb1153abb4d5e888b4675594b636456146c189fba2f81e6303dfa3a5b661f6d58385a0"},
88-
# @payment_channel="cz_gp_w",
89-
# @payment_session_id="3000523838",
90-
# @product_name="productName",
91-
# @total_price_in_cents=100,
92-
93-
# After user gets back to success/failed url, you can check status of payment:
94-
payment = GoPay::EshopPayment.new(:variable_symbol => "XXXXX",
95-
:total_price_in_cents => price.to_i,
96-
:product_name => name,
97-
:payment_session_id => payment_session_id,
98-
:payment_channels => ["cz_gp_w"])
99-
100-
payment.actual_session_state # => "PAYMENT_DONE"
101-
payment.is_in_state?(GoPay::PAYMENT_DONE) # => true
102-
103-
</pre>
58+
While gem is under decent construction, I removed old usage example in favor of tests that are actual as hell! ;)
10459

60+
Big thanks to @Pepan, who moved gem to 1.9.3!

0 commit comments

Comments
 (0)