user upgrades: add links to Stripe payment & receipt page.

Add links to the Stripe payment page and the Stripe receipt page on
completed user upgrades.

The Stripe payment link is a link to the payment details on the Stripe
dashboard and is only visible to the owner.
This commit is contained in:
evazion
2020-12-28 22:25:09 -06:00
parent e29e2da8be
commit 87af02f689
8 changed files with 154 additions and 6 deletions

View File

@@ -27,6 +27,16 @@ class UserUpgradesController < ApplicationController
respond_with(@user_upgrade)
end
def receipt
@user_upgrade = authorize UserUpgrade.find(params[:id])
redirect_to @user_upgrade.receipt_url
end
def payment
@user_upgrade = authorize UserUpgrade.find(params[:id])
redirect_to @user_upgrade.payment_url
end
private
def recipient