@@ -55,50 +55,6 @@ Such YAML config file can be also placed in Rails config dir (named gopay.yml) -
55
55
56
56
h2. Usage
57
57
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! ;)
104
59
60
+ Big thanks to @Pepan, who moved gem to 1.9.3!
0 commit comments