~singpolyma/jmp-pay

fc43c79413096a8899acd0c54345af90c19f95fa — Stephen Paul Weber 3 years ago 2872a5f
Send complete, useful approval message on account activation

With link pointing to jmp-register until new-signup happens.
1 files changed, 11 insertions(+), 1 deletions(-)

M bin/process_pending_btc_transactions
M bin/process_pending_btc_transactions => bin/process_pending_btc_transactions +11 -1
@@ 164,7 164,17 @@ class Plan
			)
			insert(start: Date.today, expire: @go_until)
			REDIS.del("pending_plan_for-#{@customer.id}")
			@customer.notify("Your account has been activated")
			notify_approved
		end

		def notify_approved
			sid = REDIS.get("reg-sid_for-#{@customer.id}")
			tel = REDIS.get("reg-session_tel-#{sid}").sub(/\+/, "%2B")
			@customer.notify(
				"Your JMP account has been approved. To complete " \
				"your signup, click/tap here: " \
				"https://jmp.chat/sp1a/register4/?sid=#{sid}&number=#{tel}"
			)
		end
	end
end