22 lines
792 B
Ruby
22 lines
792 B
Ruby
|
module NkuhtDonateHelper
|
||
|
def page_for_donate_payment(status=nil, id="")
|
||
|
|
||
|
pages = Page.where(:module=>'nkuht_donate')
|
||
|
ann_page = pages.first
|
||
|
|
||
|
if status == 'ok'
|
||
|
request.protocol+(request.host_with_port+'/'+I18n.locale.to_s+ann_page.url+'/?method=payment_ok').gsub('//','/') rescue "/"
|
||
|
else
|
||
|
request.protocol+(request.host_with_port+'/'+I18n.locale.to_s+ann_page.url+'/?method=payment_no&no='+id).gsub('//','/') rescue "/"
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|
||
|
def page_for_donate_receipt_notice(donate=nil)
|
||
|
ann_page = nil
|
||
|
pages = Page.where(:module=>'nkuht_donate')
|
||
|
ann_page = pages.first
|
||
|
request.protocol+(request.host_with_port+'/'+I18n.locale.to_s+ann_page.url+'/?method=receipt_notice&no='+donate.to_param+"&layout=false").gsub('//','/') rescue "/"
|
||
|
end
|
||
|
|
||
|
end
|