I hereby claim:
- I am ziyadparekh on github.
- I am zp (https://keybase.io/zp) on keybase.
- I have a public key whose fingerprint is 9283 4673 AF6C 8C96 E07C 19EE 24CE 5B41 8581 0D8F
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
0x9f5b24b6D79fdC88eaee20586EF920Fe362fB2e2 |
safepay.Button.render({ | |
env: 'sandbox', | |
amount: 6800.57, | |
client: { | |
"sandbox": "sec_4f84abd2-0bae-4476-be6b-22c8c9e35133" | |
"production": "<YOUR_CLIENT_KEY>" | |
}, | |
payment: function (data, actions) { | |
return actions.payment.create({ |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.9/angular.js"></script> | |
<script src="https://storage.googleapis.com/safepayobjects/api/safepay-checkout.min.js"></script> | |
<script> | |
window.safepay.Button.driver('angular', window.angular); | |
window.angular.module('app', ['safepay-button']).controller('appController', function($scope) { | |
$scope.opts = { | |
// Either sandbox or production | |
env: 'production', |
curl --location --request POST 'https://sandbox.api.getsafepay.com/order/v1/init' \
--header 'Content-Type: application/json' \
--data-raw '{
"client": "sec_c18b707b-bd0f-41fe-947a-e894adf81e20",
"amount": 1000.00,
"currency": "PKR",
"environment": "sandbox"
}'
The plugin will work as follows:
To integrate with Safepay, you will need a production account and a sandbox account.
Production accounts can be created by visiting this link https://getsafepay.com
Sandbox accounts can be created by visiting this link https://sandbox.api.getsafepay.com
Please take a note of your:
# Create your views here. | |
import hashlib | |
import base64 | |
import os | |
import hmac | |
import urllib | |
from datetime import datetime | |
import random | |
from django.shortcuts import redirect | |
from django.http import HttpResponse |
<!-- Add this script tag to the <head> of the Checkout demo page !--> | |
<script type="text/javascript" src="https://storage.googleapis.com/safepayobjects/api/safepay-checkout.min.js"></script> | |
<!-- Add this script tag to the <head> of the Checkout demo page !--> | |
<!-- Add this script tag to the end of the <body> of the Checkout demo page !--> | |
<script type="text/javascript"> | |
safepay.Button.render({ | |
env: 'production', | |
amount: 100, | |
client: { |