FlexWin (Method 1)

- FlexWin as a Pop-up Window

The DIBS FlexWin is designed to be run either as a popup window or inline. Using FlexWin as a popup can be accomplished by including the following JavaScript on the page that starts the payment process:


<!--StartFragment --> 

<script type="text/javascript">

<!--

var newwin = null;

function doPopup() {

  newwin = window.open('', 'paywin', 'scrollbars,status,width=550,height=600');

  newwin.focus();

  return true;

}

//-->

</script>


The JavaScript is used whilst calling the the payment form, e.g.:  


<!--StartFragment -->

<a href="http://shopsite/payform.html" 

  onclick="return doPopup();" target="paywin">Start payment</a> 


Example

Below is a code sample of a payment form loaded into the popup window which automatically starts the DIBS FlexWin:


<!--StartFragment -->

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 

    www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>

<html>

<head>

<title>Example of a payment form</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<meta http-equiv="Content-Script-Type" content="text/javascript" />

<meta http-equiv="Content-Style-Type" content="text/css" />

<script type="text/javascript">

<!--

window.onload = function (evt) { document.forms[0].submit(); }

//-->

</script>

</head>

<body>

<form name="payform" method="post" 

      action="https://payment.architrade.com/paymentweb/start.action">

  <input type="hidden" name="merchant" value="1111111" />

  <input type="hidden" name="orderid" value="1234" />

  <input type="hidden" name="lang" value="da" />

  <input type="hidden" name="amount" value="4200" />

  <input type="hidden" name="currency" value="208" />

  <input type="hidden" name="accepturl" value="http://SHOPSERVER/accpted.html" />

  <input type="hidden" name="callbackurl" value="http://SHOPSERVER/feedback.php" />

  <input type="hidden" name="cancelurl" value="http://SHOPSERVER/canceled.html" />

  <input type="hidden" name="calcfee" value="yes" />

  <input type="hidden" name="delivery1.Navn" value="Jens Hansen" />

  <input type="hidden" name="delivery2.Adresse" value="Apple Road 1" />

  <input type="hidden" name="delivery3.Kommentar" value="Comment" />

  <input type="hidden" name="ordline0-1" value="Item number" />

  <input type="hidden" name="ordline0-2" value="description" />

  <input type="hidden" name="ordline0-3" value="numer" />

  <input type="hidden" name="ordline0-4" value="price" />

  <input type="hidden" name="ordline1-1" value="102" />

  <input type="hidden" name="ordline1-2" value="Pioneer CD player" />

  <input type="hidden" name="ordline1-3" value="3" />

  <input type="hidden" name="ordline1-4" value="1095" />

  <input type="hidden" name="ordline2-1" value="201" />

  <input type="hidden" name="ordline2-2" value="Sony DVD" />

  <input type="hidden" name="ordline2-3" value="2" />

  <input type="hidden" name="ordline2-4" value="1995" />

  <input type="hidden" name="priceinfo1.shippingcosts" value="36" />

  <input type="hidden" name="priceinfo2.VAT" value="1024" />

</form>

</body>

</html> 


 
CMS - Content Management System By SiteLoom