Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/controllers/api/v1/subscriptions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ def check_error(object)
FakepayService.check_amount_with_plan(params)
formatted = FakepayService.parse_json(object)
if formatted[:success] == false
puts "Your transaction failed due to error code: #{formatted[:error_code]}. Please check the error code description"
render json: {"Your transaction failed due to error code: #{formatted[:error_code]}. Please check the error code description"}
# puts "Your transaction failed due to error code: #{formatted[:error_code]}. Please check the error code description"
elsif formatted[:success] == true
puts "Your transaction was successfully posted!"
render json: {"Your transaction was successfully posted!"}
Customer.store_token(formatted, params, customer_params)
else
puts formatted
Expand Down