This file contains hidden or 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
| class OrdersController < ApplicationController | |
| # This action processes the payment for a given order. | |
| def process_payment | |
| @order = Order.find(params[:id]) | |
| # Attempt to charge the user via a payment gateway | |
| payment_successful = PaymentGateway.charge( | |
| amount: @order.total_amount, | |
| card_token: params[:payment_details][:card_token] |
This file contains hidden or 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
| {"label":"Coverage Report","message":"66%","schemaVersion":1,"color":"yellow","namedLogo":"python"} |
This file contains hidden or 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
| {"label":"Test Coverage","message":"55%","schemaVersion":1,"color":"orange","namedLogo":"pytest"} |