Skip to main content

Files for integrating with the RedPay Engine

Project description

logo

Red Shepherd Python API Docs

Follow these steps for Simple API Integration


Step 1 a- Adding the payment library using pip

pip install RedPay

Step 1 b - Create a RedPay object for secure API methods

### REPLACE app, url and key with your PROD keys and use a valid account
### These are DEMO Keys which you can safely use for testing
app = "DEMO";
endpoint = "https://redpaystable.azurewebsites.net/";
key = "MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAtsQxNp3vmKVNYIxfWSi0LIRgCnPaMn0MUNouxgrs4zmg4cnvSeQ3I8YP03YbpXuWA80RvOw/nWErYAKomniJw8Y+xexMfBQ5sgJgewn3ZnRPNM9Y4Z62gwfIlsrs7Bwvpz9uUtLgeQLl1ffNaumnu1IBrqRps0EZ1QyDuu41UckTyo31C40Wez6IbeMfZeusrmPlIWqyBacdviJ5zHCA3zHNq86QMnB8HOP1U81HOSs6GTTelhD7lCoJ+fHKHxcz0MDr37fNpKpC57B0/20wBXFp9tlVtSkHcIty1lyNk2/HDH8knCdqkZk+fCvWgGwdex41x8/rM+LKC13c5J/yG6Gb2PnKhwNk4lvvnz73YAdqTUJ7qNrdtWVnOTWfbMBiNlpBCVqt8xY8UK6u83AVWrWXse0xe2Pn/kRqlXmxWT0mGEoCavjvZ9lQUL7LXAXZ1dff9r+oFUZo6xDQ3ER/OTIKa4jpvaI9S/J1drsrI1f9kkMWFwEh48dCPYplGSxzAgMBAAE=";

### Use this redpay object for all the API calls
redpay = RedPay(app, key, endpoint)

Step 2 a - Charge a Credit / Debit Card

import json

request = {
    "account": "4111111111111111",
    "amount": 2000,
    "expmmyyyy": "122024",
    "cvv": "123",
    "accountHolder": "Anna Conda",
    "zipCode": "10001"
}

print("CHARGE Credit Card request >>>")
print(json.dumps(request, indent=2))

response = redpay.ChargeCard(request)

print("CHARGE Credit Card response >>>")
print(json.dumps(response, indent=2))

ChargeCard Request Example

let req = {
  account: "4111111111111111",
  amount: 2000,
  expmmyyyy: "122023",
  cvv: "123",
  cardHolderName: "Anna Conda",
  avsZip: "10001",
};

ChargeCard Response

{
  responseCode: "A",
  transactionId: "DEMO.j1kbwwwh531ivcsh",
  authCode: "PPS531",
  token: "9418594164541111",
  cardLevel: "Q",
  cardBrand: "V",
  cardType: "C",
  processorCode: "CC",
  app: "DEMO",
  account: "9418594164541111",
  cardHolderName: "Anna Conda",
  amount: 2000,
  timeStamp: "12/10/2020 1:46:47 AM",
  text: "Approval Approval",
  ipAddress: "198.54.106.248:51554",
  avsCode: "Z"
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

RedPay-1.2.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

RedPay-1.2.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file RedPay-1.2.1.tar.gz.

File metadata

  • Download URL: RedPay-1.2.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for RedPay-1.2.1.tar.gz
Algorithm Hash digest
SHA256 40deeaf61d74ea74c4f3fb64a9d9d7838acb19f249082359bd56daefb18623cc
MD5 cfae1a6879084be0daaaf7e9c92e2e37
BLAKE2b-256 642c40a3e00072938e8c09d32fa7d360fd2581dd8562a95fcf1788440104882b

See more details on using hashes here.

File details

Details for the file RedPay-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: RedPay-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1

File hashes

Hashes for RedPay-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 92f6c8e01e207439327f2e5d8c98d16dcd4327118241eb42c4445fcfb7359774
MD5 d5496b66cbbbb58ff1c1342cd16d3cb6
BLAKE2b-256 a9469cf2bd150e4e3d578f9947a6826fb90d1ae9a16206e537ed74cdcfa1fd26

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page