Sha256: 165dcce4ac8f887616b5740e7dd0870e66b396f24f07b0c6c0a7aba3d2e1db77

Contents?: true

Size: 1.3 KB

Versions: 59

Compression:

Stored size: 1.3 KB

Contents

module Auth::Shopping::Payments::PaymentsHelper

    ###################################################
    ##
    ##
    ## OTHER HELPERS. 
    ##
    ##
    ###################################################

    def payment_status_to_string(payment)
        if payment.payment_status.nil?
            "pending"
        elsif payment.payment_status == 1
            "successfull"
        else
            "failed"
        end
    end


    ###################################################
    ##
    ##
    ## PATH HELPERS.
    ##
    ##
    ###################################################

	## get /new
	def new_payment_path(options={})
      main_app.send(Auth::OmniAuth::Path.new_path(Auth.configuration.payment_class),options)
    end



    ## (PUT/PATCH/GET) - individual payment
    def payment_path(payment)
    	
    	main_app.send(Auth::OmniAuth::Path.show_or_update_or_delete_path(Auth.configuration.payment_class),payment)
    end

	
	##/payments (GET - all payments /CREATE - individual payment) 
	def payments_path
    	main_app.send(Auth::OmniAuth::Path.create_or_index_path(Auth.configuration.payment_class))
    end

    ##/shopping/payments/:id/edit
    def edit_payment_path(payment)
    	main_app.send(Auth::OmniAuth::Path.edit_path(Auth.configuration.payment_class),{:id => payment.id.to_s})
    end

end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
wordjelly-auth-1.6.0 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.9 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.8 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.7 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.6 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.5 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.4 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.3 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.2 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.1 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.5.0 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.4.9 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.4.8 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.4.7 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.4.6 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.4.5 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.4.4 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.4.3 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.4.2 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.4.0 app/helpers/auth/shopping/payments/payments_helper.rb