Skip to main content

PHP

PHP | HTML

Sample Code

<!DOCTYPE html>
<script src="./synapse_es6_js_sdk.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dsbridge/3.1.4/dsbridge.min.js"></script>
<html>
<head>
<title>Synapse SDK Integration</title>
</head>
<body>
<h1>Synapse SDK Integration Example</h1>
<button id="initiatePaymentButton">Initiate Payment</button>

<script>
const synapseSdk = new SynapseSdk(bridge)

document.getElementById('initiatePaymentButton').addEventListener('click', () => {
synapseSdk.initiateSynapsePayment()
.then(response => {
// Handle the response here
console.log('Payment initiated:', response);
})
.catch(error => {
console.error('Error initiating payment:', error);
});
});
</script>
</body>
</html>