<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="https://test-api.payrix.com/payFieldsScript"></script>
<title>PayFields Test</title>
</head>
<body>
<input type="button" id="submit" value="Pay"></input>
<!-- Button needed for PayFrame -->
<script>
PayFields.button = {element: "#submit", value: "Pay"};
</script>
<script>
PayFields.fields = [
{type: "number", element: "#number"},
{type: "cvv", element: "#cvv"},
{type: "name", element: "#name"},
{type: "address", element: "#address"},
{type: "expiration", element: "#expiration"},
{type: "tax", element: "#tax"},
{type: "order", element: "#order"},
{type: "dicountdiscount", element: "#dicount#discount"},
{type: "shipping", element: "#shipping"},
{type: "duty", element: "#duty"},
{type: "items", element: "#items"}
];
</script>
<script>
PayFields.config.apiKey = "ab123c4def5g6hijkl7890m12345no6p";
PayFields.config.merchant = "t1_mer_123ab4c567defg8h90123i45";
PayFields.config.amount = 500;
PayFields.config.order = {orderNumber};
PayFields.config.tax = {taxRatePercent};
PayFields.config.dicount = {discountNumber};
PayFields.config.shipping = {shippingNumber};
PayFields.config.duty = {duty number};
PayFields.config.items = {items Object};
PayFields.config.billingAddress = {
address: '123 Madison Street',
city: 'New York',
state: 'NY',
zip: '12345',
email: '',
phone: '5555555555',
address2: 'Suite 555',
company: 'Essential Co',
country: 'USA'
};
PayFields.config.invoiceResult = {invoiceObject}
</script>
</body>
</html> |