Skip to content

This Repo contais all files and instructions of what I did to create a simple integration with codeigniter and Stripe.

License

Notifications You must be signed in to change notification settings

mullerjk/stripeCodeigniter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 

Repository files navigation

Welcome to Stripe + Codeigniter

Hi! I'm probably your first interaction with Codeigniter and Stripe, happy to se you, this repo only demonstrates how to connect and realize a transaction, it's not ready for production uses.

Requeriments

  1. Clone This Repository

You will need to have git and php installed in your pc, then.

git clone https://github.com/mullerjk/stripeCodeigniter.git
  1. Installing CodeIgniter

We will use the version 3.1.11 of Codeigniter in this project.

Download in this link. https://codeigniter.com/userguide3/installation/downloads.html

Instal in this link. https://codeigniter.com/userguide3/installation/index.html

Install codeigniter inside your stripeCodeigniter folder.

  1. Installing Stripe PHP Library

Download the zip on link bellow. https://github.com/stripe/stripe-php

Unzip and rename to stripe-php, copy the folder with the content inside the following path.

stripeCodeigniter/application/libraries

Obtain Your Stripe Keys

That was my first time dealing with stripe, and I could notice a very powerfull and easy to understood documentation, this integration worked like a charm.

Grab your Publishable and Secret Keys

All instructions needed here. https://stripe.com/docs/keys#obtain-api-keys

Now with your keys in hand.

Edit Your Config.php

You have to store your keys in your application, I'm not doing any security or optmization implementation because the focus is to keep our application lean e effective to test it.

#----------------------------------------------
# Stripe Config
#-----------------------------------------------
$config['stripe_key'] = 'pk_test_*****';
$config['stripe_secret'] = 'sk_test_*****';
$config['sess_save_path'] = sys_get_temp_dir();

You know what to do here, alright?! Edit with your credentials and paste at very bottom of your:

stripeCodeigniter/application/config/config.php

Let's Try?

Open your browser("your host adrees"/stripeCodeiginiter) like mine.

https://localhost/stripeCodeigniter/

Make A Payment

Click on proceed to checkout and make your payment. The test card data are:

Test 4242 4242 4242 4242  456 12 2025

🥳 Congratulations

Chechout your sale on your account balance on Stripe.

That's it. Thank you, to come here.

About

This Repo contais all files and instructions of what I did to create a simple integration with codeigniter and Stripe.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published