Class: ODDB::View::PayPal::Return

Inherits:
ODDB::View::PublicTemplate show all
Defined in:
src/view/paypal/return.rb

Constant Summary

CONTENT =
ReturnComposite

Constants inherited from ODDB::View::PublicTemplate

COMPONENTS, CONTENT, CSS_CLASS, DOJO_DEBUG, DOJO_ENCODING, DOJO_PARSE_WIDGETS, DOJO_PREFIX, DOJO_REQUIRE, FOOT, HEAD, HTTP_HEADERS, META_TAGS

Instance Method Summary (collapse)

Methods inherited from ODDB::View::PublicTemplate

#content, #css_link, #dynamic_html_headers, #foot, #head, #init, #javascripts, #title, #title_part_three, #topfoot

Methods included from Custom::HeadMethods

#just_medical, #oekk_head

Instance Method Details

- (Object) http_headers



114
115
116
117
118
119
120
121
122
123
124
125
# File 'src/view/paypal/return.rb', line 114

def http_headers
  headers = super
  if(@model && !@model.payment_received?)
    args = { :invoice => @model.oid }
    ## use event_url as opposed to _event_url in order to include
    ## the state-id, so we stay in the same state instead of
    ## creating a new one with each refresh
    url = @lookandfeel.event_url(:paypal_return, args)
    headers.store('Refresh', "10; URL=#{url}")
  end
  headers
end