Last active
September 16, 2020 06:33
-
-
Save ziyadparekh/e55a196ad343850b65be8f9e00308078 to your computer and use it in GitHub Desktop.
Safepay Integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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({ | |
transaction: { | |
amount: 6800.57, | |
currency: 'PKR' | |
} | |
}) | |
}, | |
onCancel: function (data, actions) { | |
console.log(data) | |
console.log(actions) | |
}, | |
onCheckout: function(data, actions) { | |
console.log(data) | |
console.log("You completed the payment!"); | |
} | |
}, '#container'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey you can check out this link for angular integration.
https://gist.github.com/ziyadparekh/62f04992b544566a9dc01181bf21b3e1
I don’t think we have typescript bindings at the moment though