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.3.9 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.3.8 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.3.7 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.3.6 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.3.5 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.3.3 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.3.2 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.3.1 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.3.0 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.2.9 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.2.8 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.2.6 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.2.5 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.2.4 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.2.3 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.2.2 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.2.1 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.2.0 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.1.9 app/helpers/auth/shopping/payments/payments_helper.rb
wordjelly-auth-1.1.8 app/helpers/auth/shopping/payments/payments_helper.rb