All Projects → PaystackHQ → PaystackJS-Sample-code

PaystackHQ / PaystackJS-Sample-code

Licence: other
Bare Paystack JS implementation. Style pay.html as required

Programming Languages

javascript
184084 projects - #8 most used programming language
PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to PaystackJS-Sample-code

card-validator
Card validation helpers for payment forms.
Stars: ✭ 22 (+46.67%)
Mutual labels:  payments, visa, mastercard
paymentgateway
Dokumentace ČSOB platební brány a jejího eAPI pro platby platebními kartami, Apple Pay, mallpay a platebními tlačítky ČSOB.
Stars: ✭ 104 (+593.33%)
Mutual labels:  payments, visa, mastercard
cybersource-sdk-java
Java SDK for CyberSource Simple Order API
Stars: ✭ 44 (+193.33%)
Mutual labels:  payments, visa
laravel-sibs-payments
Laravel library to communicate with SIBS - Open Payment Platform. The library includes payments: MBWAY, VISA, MASTER, AMEX, VPAY, MAESTRO, VISADEBIT, VISAELECTRON.
Stars: ✭ 30 (+100%)
Mutual labels:  payments, visa
PaymentCardView
Custom Credit/Debit card view
Stars: ✭ 62 (+313.33%)
Mutual labels:  visa, mastercard
ccid-utils
A USB smartcard driver including GSM SIM and EMV credit/debit card development platforms
Stars: ✭ 37 (+146.67%)
Mutual labels:  visa, mastercard
cybersource-android-sdk
The CyberSource InApp SDK enables developers to simply and securely incorporate mobile payments into their Android applications.
Stars: ✭ 25 (+66.67%)
Mutual labels:  payments, visa
abap-alv-google-upload-sheet
Sample demonstrating export of ALV Grid data from SAP GUI directly to Google Drive and display exported data snapshots automatically in Google Sheets.
Stars: ✭ 24 (+60%)
Mutual labels:  sample
VISAInstrument
基于NI-VISA/VISA32(Virtual Instrument Software Architecture)的仪器编程(C#),支持RS232、USB、GPIB及LAN通信接口的收发控制
Stars: ✭ 132 (+780%)
Mutual labels:  visa
react-strap-table
react table (client and server-side) based on bootstrap.
Stars: ✭ 28 (+86.67%)
Mutual labels:  client-side
react-recurly
React components for Recurly.js
Stars: ✭ 38 (+153.33%)
Mutual labels:  payments
cloud-weatherapp
New sample application demonstrating the interplay of several HCP services to develop a full fledged application.
Stars: ✭ 17 (+13.33%)
Mutual labels:  sample
smb-summit-hackathon
Build Blocks for the SAP SMB Summit Hackathons.
Stars: ✭ 23 (+53.33%)
Mutual labels:  sample
Pentecost
Payment Android UI Library for PayStack
Stars: ✭ 22 (+46.67%)
Mutual labels:  paystack
awesome-pix
Awesome PIX
Stars: ✭ 127 (+746.67%)
Mutual labels:  payments
sap-tech-bytes
Accompanying the SAP Developer Advocates "SAP Tech Bytes" initiative.
Stars: ✭ 47 (+213.33%)
Mutual labels:  sample
domain-browser
Node's domain module for the web browser
Stars: ✭ 30 (+100%)
Mutual labels:  client-side
mobimoney
Cross-platform mobile payments project for React Native
Stars: ✭ 14 (-6.67%)
Mutual labels:  payments
saasform
Add signup & payments to your SaaS in minutes.
Stars: ✭ 247 (+1546.67%)
Mutual labels:  payments
steedos-app-contract
开源合同管理系统,基于华炎魔方开发,多租户,云服务
Stars: ✭ 74 (+393.33%)
Mutual labels:  payments

Barebones Checkout using PaystackJS

CONTENTS OF THIS FILE

  • Introduction
  • Requirements
  • Files
  • Installation
  • Configuration
  • Run
  • Test Verve card
  • Security

Introduction

You can now accept card details directly on your website while using PaystackJS to handle the checkout.

Requirements

To run this sample, you need an apache server that supports:

  • PHP 5.4
  • TLSv1.2

Files

pay.html

This contains divs and forms whose ids and attributes have been set to the minimum required to conclude checkout. Please only add attributes to these except form#checkout-form which is our sample checkout ..

To make this work for you, add the divs and forms as they are to your existing checkout page and style them as required.

IMPORTANT NOTE:

TO AVOID MISTAKENLY SENDING ANY OF THE FORM INFORMATION TO YOUR BACKEND, DO NOT SET A name FOR ANY OF THE FIELDS IN THE PAYMENT FORMS.

js/main.js

This handles paystack.js on your behalf leaving you to only style the divs in pay.html

js/app.js

This contains sample checkout code that communicates with your backend to start a transaction, report client side errors and verify transactions when successful.

This will need to change in accordance with your flow. Do note that js/main.js calls 2 functions in this file: reportErrorToBackend and verifyTransactionOnBackend. If you have to change their names and/or parameters, remember to ensure js/main.js is edited to use them properly

index.php

This is a sample backend that communicates with paystack's API in the sample. You will probably have to dispose of this after reading through the sample code.

Your own backend will have to expose endpoints for getting an access code and verifying a transaction.

.htaccess

This is part of our sample backend which ensures index.php handles all requests. Again, you will probably have to dispose of this too.

Installation

Download the code and host on an Apache server that supports TLSv1.2 and at least PHP 5.4.

Configuration

Edit index.php providing your secret key.

Run

To run the sample, navigate to the folder where you unzipped the sample.

Test Verve card

Here is a test Verve card you can use with a test secret key:

  • Card PAN: 5060666666666666666
  • Card CVC: 123
  • Expiry Date: any future date
  • PIN: 1234
  • OTP: 123456

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Contact

For more enquiries and technical questions regarding this sample, please post on our issue tracker: https://github.com/PaystackHQ/PaystackJS-Sample-code/issues.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].