
Learn test driven development by building a real store with a simple shopping cart and a Strype API checkout, ensuring full integration tests.
Set up a fresh Laravel 5.6 project with composer, configure Homestead, map store/public in Vagrant, update hosts for store.local, and launch a local development site.
Identify testing priorities by building a product list and simple session cart, then implement a Stripe checkout flow and an order confirmation, with artisan tests and annotated test cases.
Apply a test-driven approach to build a Laravel product list: fix models and migrations, routes and views, use an in-memory database with RefreshDatabase, and implement a price formatting method.
Create a Laravel test to add a product to cart, verify redirection to cart view, and store cart in session while checking cart content and total price.
Demonstrate building the cart view in a test-driven Laravel workflow by wiring routes, creating a cart controller with index and update, and displaying cart items with product names and prices.
Drive cart functionality with unit tests in a Laravel setup, creating a cart, adding products, verifying item counts, calculating total price, and persisting the cart in session.
drive a purchase test in laravel to validate stripe checkout, build a product and cart, post to orders with a stripe token, and mock payment to assert a $10 charge.
Develop a test-driven checkout in Laravel by creating a fake payment, binding a payment contract, and implementing the order store with unit tests.
Fix the missing total in the cart with unit tests, implement a fake payment charge, and verify order creation under test-driven development.
learners create orders after a purchase by simulating a cart, a fake payment, and posting to orders, while validating email and total through a migration and model setup.
Implement a many-to-many relationship between orders and products, adding a pivot price, creating the order_product table, and updating tests to verify products attach to orders after purchase.
Create an integration test that performs real Stripe charges using a token, sourcing keys from config or environment variables and verifying the last charge via Stripe API.
Develop and test real Stripe charges in a Laravel project by implementing the charge method and using the Stripe API to create and validate the last charge.
Create and style a Laravel product list page by seeding a store database, applying a Blade layout with Bootstrap, and implementing an add-to-cart action using CSRF and method spoofing.
Extend the application layout to create the cart content view with a panel header, a continue shopping button to the product list, a placeholder image, and product names with prices.
Build a test-driven stripe checkout in Laravel by integrating Stripe.js, configuring keys, and posting order data to complete payments and redirect to the orders page.
Redirect to orders with the new order ID to display the order email, program name, product price, and the order total on the orders show page.
Wraps up the course by demonstrating test-driven development of a Stripe checkout in Laravel, with a session-based shopping cart and real payments integration.
Integrating a third party API into your project can be complicated. Even more so if you want to use Test Driven Development. In this course we will examine a simple approach to test your integration with Stripe
Create a Shopping Cart with Stripe Checkout using TDD and Laravel
By the end of this course, you will acquire sufficient knowledge on:
Feature, Unit and Integration Testing
Test Driven Development
Stripe API
Develop faster and deliver better products
By using Test Driven Development and integration testing, you will feel much more confident about your final product and its interactions with a third party API, knowing that it has been thoroughly tested and it works as intended.