Skip to content

manish-dewani/hosted-payment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Checkout page with subscriptions for paypal and stripe

Explore a full, working code sample of an integration with Stripe Checkout and Customer Portal. Also Paypal wallet Checkout with card options.

This all has been made using php, paypal sdk and stripe-php

Installation Guide

For Paypal

You need

go to paypal folder inside project

  1. open .env file
  2. add below details to .env
PAYPAL_CLIENT_ID = #paypal client key
PLAN_ID = #plan if for a product which needs subsription
ORDER_ID= {any integer number}
CANCEL_URL= {http://localhost}
RETURN_URL= {http://localhost}
  1. save .env file

For Stripe

  1. Open terminal (command prompt)
  2. CD to stripe folder inside project
run composer update

You need

go to stripe folder inside project

  1. open .env file
  2. add below details to .env
API_KEY=#stripe api key
LOOKUP_KEY=#look up key for a product which needs subsription
RETURN_URL= {http://localhost}
  1. save .env file

Run the server

php -S 127.0.0.1:4242
3. Go to [http://localhost:4242](http://localhost:4242)