Info


Stripe Pay for PHP Developer via Stripe V3


Author : CodeDaddy

Create Date : September 18, 2020

Support : yupokteam@gmail.com

Overview


Stripe Pay for PHP Developer is very powerful tool to your Business. You can easily integrate Stripe Payment Gateway to your website.

You should have Basic Knowledge of Session and Insert SQL Query into Database.

Security : It is protected against SQL injection, XSS and other attack and your website will be safe.

Requirements


Before starting to install, make sure you fulfill the following requirements:
  • PHP Basic Knowledge
  • Knowledge of SQL Insert query to Database.
  • Stripe Account.
  • https Website
  • You can use this script on any live LINUX or PHP server or Localhost.
  • On Localhost - Only Testing Mode is working
  • Required PHP version in server >= 5.4.

Features


  • Integrate Stripe Payment into Existing Website.
  • Pass Dynamic Item Name
  • Pass Dynamic Item ID
  • Pass User Name
  • Pass User Email
  • Pass Website Logo
  • Pass Homepage Link after Successful Payment
  • Well Comments Provide what & where to do.
  • Insert Payment Query into Database Example
  • Well Comment to Link your Database File on Payment Page

How to Create Database, Username, Password & Import SQL file? (It's Only a Demo)


  • Step 1: Login to your website CPanel with your Username & Password.


  • Step 2: On Homepage, Scroll Down to Databases & Click on MYSQL Databases option.


  • Step 3: Create New Database, Just assume (This is Only Demo Purpose) we want to give name of Our Database is billing_system So Just write billing_system & press Create Database Button.


  • Step 4: A message appears, Added the database "yupok_billing_system" It means Your Database Name : yupok_billing_system , Note : yupok_ prefix is demo, your website automatic added Prefix to your database name.So copy that name that is your Original Database Name.


  • Step 5: Press Go Back and return to Database Page again.

  • Step 6: Scroll Down the Page, MYSQL Users Add New User, Just fill the details like you want to use Username & Password & keep details in the safe place & Press Create User button.


  • Step 7: A message appears, You have successfully created a MySQL user named "yupok_demo_user". It means Your Database USERName : yupok_demo_user , Note : yupok_ prefix is demo, your website automatic added Prefix to your Username.So copy that name that is your Original Database Username.

  • Step 8: Press Go Back and return to Database Page again.

  • Step 9: Scroll Down the Page again to Add User to Database . Select your Last Created Username & Last Created Database for this billing system & Press Add Button.


  • Step 10: You will redirect to Another Page. Click on ALL PRIVILEGES option, Scroll down & Press Make Changes Button.



  • Step 11: A Success message appears on top right corner. After that scroll down to the page and press Go Back


  • Step 12: Example
    YOUR_HOST_NAME : localhost  Mostly its localhost but if not then contact your website service provide.
    YOUR_DATABASE_NAME : yupok_billing_system  This is demo which we explained above. Your real database name is different.
    YOUR_DATABASE_USERNAME : yupok_demo_user  This is demo which we explained above. Your real database username is different.
    YOUR_DATABASE_Password : password  That is explained in Step 6.
  • Step 13: Import sql file to Database. Go to CPanel homepage scroll down to Database , Click on phpMyAdmin, your database will be open.

  • Step 14: On the left sidebar your Newly Database Option will be shown Just click on that.

  • Step 15: After click see on right side there is Import Option click on that and browse & select sql file from your downloaded database folder and press Go Button on the bottom.


  • Step 16: Your database will be imported and your website is ready to Use.

Configuration & Stripe Setup


Do Carefully Otherwise Script will not work

  • Unzip the Downloaded File, Go to upload Open payments.php File in any Text Editor like Notepad++, Dreamweaver , etc.



  • Now Go to jsStripe Folder and Open errorMsg.js file


  • Open errorMsg.js File. Go to Line No. 9 & Change inside single inverted comma '' with Your Stripe Publishable Key. Otherwise Script won't work.

  • How to get Stripe Secret & Publishable Key. - Login to your Stripe Account and Go to Developers->API Keys Stripe API Keys


  • Open stripePay.php file & Pass all the Item Data.


  • Note : On payments.php there is a comment near line 90 //SQL Query remove that line and insert payment into your database accroding to your need. We have passed all the things, Item Id, Item Name, User name, User Email, Amount, Transaction ID, Date everything.
  • Upload All folder and file and its Done.

Copyright © CodeDaddy


You are not allowed to use this documentation template for your personal or commercial or any other purposes.