-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into stable/1.2.x
- Loading branch information
Showing
14 changed files
with
56 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,7 @@ Crowdhoster.campaigns = | |
form.appendChild(input[0]) | ||
form.submit() | ||
else | ||
$('#errors').append('<p>An error occurred. Please check your credit card details and try again.</p>') | ||
$('#errors').append('<p>An error occurred. Please check your credit card details and try again.</p><br><p>If you continue to experience issues, please <a href="mailto:[email protected]?subject=Support request for a payment issue&body=PLEASE DESCRIBE YOUR PAYMENT ISSUES HERE">click here</a> to contact support.</p>') | ||
$('#errors').show() | ||
$('.loader').hide() | ||
$button = $('button[type="submit"]') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ def checkout_payment | |
|
||
end | ||
|
||
def checkout_confirmation | ||
def checkout_process | ||
|
||
ct_user_id = params[:ct_user_id] | ||
ct_card_id = params[:ct_card_id] | ||
|
@@ -151,7 +151,7 @@ def checkout_confirmation | |
logger.info response | ||
rescue => exception | ||
logger.info "ERROR WITH POST TO /payments: #{exception.message}" | ||
redirect_to checkout_amount_url(@campaign), flash: { error: "There was an error processing your payment, please try again" } and return | ||
redirect_to checkout_amount_url(@campaign), flash: { error: "There was an error processing your payment, please try again or contact support by emailing [email protected]" } and return | ||
end | ||
|
||
# Sync payment data | ||
|
@@ -170,6 +170,17 @@ def checkout_confirmation | |
logger.info "ERROR WITH EMAIL RECEIPT: #{exception.message}" | ||
end | ||
|
||
redirect_to checkout_confirmation_url(@campaign), :status => 303, :flash => { payment_guid: @payment.ct_payment_id } | ||
|
||
end | ||
|
||
def checkout_confirmation | ||
@payment = Payment.where(:ct_payment_id => flash[:payment_guid]).first | ||
flash[:payment_guid] = nil # Unset flash because application renders all flash vars (long-term should be refactored) | ||
|
||
if !@payment | ||
redirect_to campaign_home_url(@campaign) | ||
end | ||
end | ||
|
||
private | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
Hi <%= @payment.fullname.split(' ')[0] %>, | ||
|
||
This email is a confirmation of your $<%= number_with_precision(@payment.amount.to_f/100.0 + @payment.user_fee_amount.to_f/100.0, precision: 2) %> payment to <%= @campaign.name %>. If you have any questions about this campaign, please contact <%= @settings.reply_to_email %>. | ||
This is an email receipt for your $<%= number_with_precision(@payment.amount.to_f/100.0 + @payment.user_fee_amount.to_f/100.0, precision: 2) %> contribution to <%= @campaign.name %> (<%= url_for campaign_home_url(@campaign) %>). If you have any questions about this campaign, please contact the campaign's organizer at <%= @settings.reply_to_email %><% if @settings.phone_number.present? %> or <%= @settings.phone_number %><% end %>. | ||
|
||
<% if [email protected]_flag %> | ||
This campaign is in sandbox mode, your card will not actually be charged. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddPhoneNumberToSettings < ActiveRecord::Migration | ||
def change | ||
add_column :settings, :phone_number, :string | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters