GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TestingPays/worldpay: Python package to deal with Worldpay's orders API.

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
worldpay
worldpay
 
 
.gitignore
.gitignore
 
 
LICENCE
LICENCE
 
 
README.md
README.md
 
 
setup.py
setup.py
 
 

Repository files navigation

Worldpay SDK

Worldpay SDK for orders calls.

Requirements

Python 2.7 or Python 3.6+

Installation

pip install worldpay

Usage

Things you will need

At minimum, you'd need to have a Worldpay account (a test account will do). With the account you'll receive a service key which will be needed to authenticate yourself when making calls and a client key used to when providing card details to Worldpay.

Once you have these, you can setup your Worldpay config:

from worldpay.worldpay import Worldpay

Worldpay.WORLDPAY_SERVICE_KEY = 'Your Worldpay Service Key'

Generating a Token

Prior to making a Orders request, it is necessary to get a token from Worldpay using your client key. This should be done on the client side of your application using worldpay.js. See TestingPays for a detailed example.

Orders Request

To create an orders request, pass the generated token, along with the amount, currency code and a description to the create_charge function as shown below.

  response = Worldpay.create_charge(
        token=request.POST['worldpayToken'],
        amount=request.POST['amount'],
        order_description = 'My order description',
        currency_code = request.POST['currency']
    )

A successful response object will be a dict, containing status code, order code and the message

{
  "status_code": 200,
  "message": "SUCCESS",
  "order_code": "db6f616a-08c5-11e7-8fd4-b8e8564628bc"
}

Responses other than http code of 200 will be a dict containing a status code and a message

{
  "status_code": 400,
  "message": "INVALID_PAYMENT_DETAILS"
}

About

Python package to deal with Worldpay's orders API.

Topics

sdkworldpay

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

3 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.