This project was created to wrap some exposed functions from Paybyrd Payment SDK to be used in the UI with Vanilla Javascript. Check this documentation to know how to use it and what functions we provide.
You just need to import our paybyrd.js file in your project and all the methods will be available in the window, so you don't need any instances to make it work. It's just plug and play.
Using the DEMO project, you can change the URL selecting the "three dots" button and tying the new URL
We are using a prefix called PBSDK_
to help using our methods without getting lost.
Check in the list below what methods we provide and learn more about them:
Parameter | Type | Description |
---|---|---|
data |
object |
Required. The object that will be sent to the API |
callbackResponse |
function |
Required. The callback that will be called when any response is received |
Data Reference:
{
amount: Long // 100 will be parsed to 0.01
currency: ENum // Check available currencies in the references section
type: ENum // REFUND | CHARGE
referencedTransactionIdentifier: GUID // Used when type is REFUND
}
Callback Reference:
@return {Object} // Returns an object with all transaction data with a status, so it can be used in a switch case to handle possible responses
Returns a boolean if the client is using this project under a Paybyrd SDK environment so the methods works properly
Returns the current version of the SDK project
Returns information from the APP that is being used
Returns information from the Terminal that is being integrated
If an APK Path is provided, it can installs the APP programmatically