一般有两个种方式

Open widget in modal

  1. <button onClick="openSwitchereWidget()">
  2. Click to open widget
  3. </button>
  4. <script src="https://sandbox.switchere.com/js/sdk-builder.js"></script>
  5. <script>
  6. window.openSwitchereWidget = function() {
  7. window.switchereSdk.init({
  8. // ...
  9. mode : 'modal',
  10. });
  11. };
  12. </script>
  1. <div id="switchere" style="min-height: 500px; max-width: 450px; width: 100%;">Loading...</div>
  2. <script src="https://sandbox.switchere.com/js/sdk-builder.js"></script>
  3. <script>
  4. window.switchereSdk.init({
  5. el: '#switchere',
  6. partnerKey: 'XXXXXXXXXXXXXXX',
  7. partnerOrderId: 'xxxxx-xxxxx-xxxxx-xxxxx',
  8. httpReturnSuccess: 'https://domain.tld/success',
  9. httpReturnFailed: 'https://domain.tld/failed',
  10. payinCurrency: 'USD',
  11. payinGroup: 'card',
  12. payoutAmount: '15',
  13. payoutCurrency: 'XRP',
  14. payoutGroup: 'crypto',
  15. dstAddress: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  16. memo: '10',
  17. });
  18. </script>

当前开发进度