Module: GpWebpay::Payment
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/gp_webpay/payment.rb
Instance Method Summary collapse
- #deposit_flag ⇒ Object
- #merchant_number ⇒ Object
- #operation ⇒ Object
- #pay_url(options = {}) ⇒ Object
- #payment_type ⇒ Object
- #success?(params) ⇒ Boolean
- #user_param ⇒ Object
Instance Method Details
#deposit_flag ⇒ Object
9 10 11 |
# File 'lib/gp_webpay/payment.rb', line 9 def deposit_flag 1 end |
#merchant_number ⇒ Object
21 22 23 |
# File 'lib/gp_webpay/payment.rb', line 21 def merchant_number config.merchant_number end |
#operation ⇒ Object
25 26 27 |
# File 'lib/gp_webpay/payment.rb', line 25 def operation "CREATE_ORDER" end |
#pay_url(options = {}) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/gp_webpay/payment.rb', line 29 def pay_url( = {}) self.redirect_url ||= [:redirect_url] GpWebpay.logger.info "Attributes user for URL generation: #{pay_verification.payment_attributes_with_digest}" generated_url = "#{config.pay_url}?#{pay_verification.payment_attributes_with_digest.to_param}" GpWebpay.logger.info "Produced URL: #{generated_url}" generated_url end |
#payment_type ⇒ Object
17 18 19 |
# File 'lib/gp_webpay/payment.rb', line 17 def payment_type super || "default" end |
#success?(params) ⇒ Boolean
38 39 40 41 |
# File 'lib/gp_webpay/payment.rb', line 38 def success?(params) pay_verification.verified_response?(params) && params["PRCODE"] == "0" && params["SRCODE"] == "0" end |
#user_param ⇒ Object
13 14 15 |
# File 'lib/gp_webpay/payment.rb', line 13 def user_param "R" end |