Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Solution for bill payments (variable amounts)

Certified Developer Directory

 

TJPride is one of them.

Member
Posts: 1
Registered: ‎04-28-2014

Re: Solution for bill payments (variable amounts)

Just so I understant it correctly...

This is the form code:

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Make A Payment</title>
</head>

<body>
<form method="post" action="payment2.php">
  <p>Amount: $
    <input type="text" name="amount" size="10" maxlength="10">
    <br>
    (format should be 000.00)
<br>
    <input type="submit" value="Make Payment">
  </p>
</form>
</body>
</html>

 And this is the code for payment2.php

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>University Medical Imaging</title>
<style type="text/css">
body form input {
	display: none;
}
</style>
</head>

<body  onload="document.forms.payment.submit();">
<?php
require_once 'anet_php_sdk/AuthorizeNet.php'; // Include the SDK you downloaded in Step 2
$api_login_id = '************';
$transaction_key = '*************';
$amount = $_POST['amount'];
$fp_timestamp = time();
$fp_sequence = "123" . time(); // Enter an invoice or other unique number.
$fingerprint = AuthorizeNetSIM_Form::getFingerprint($api_login_id,
  $transaction_key, $amount, $fp_sequence, $fp_timestamp)
?>

<form method='post' action="https://test.authorize.net/gateway/transact.dll" name="payment">
<input type='hidden' name="x_login" value="<?php echo $api_login_id?>" />
<input type='hidden' name="x_fp_hash" value="<?php echo $fingerprint?>" />
<input type='hidden' name="x_amount" value="<?php echo $amount?>" />
<input type='hidden' name="x_fp_timestamp" value="<?php echo $fp_timestamp?>" />
<input type='hidden' name="x_fp_sequence" value="<?php echo $fp_sequence?>" />
<input type='hidden' name="x_version" value="3.1">
<input type='hidden' name="x_show_form" value="payment_form">
<input type='hidden' name="x_test_request" value="false" />
<input type='hidden' name="x_method" value="cc">
<input type='submit' value="Click here for the secure payment form">
</form>
Payment Gateway Is Loading
</body>
</html>

 This was compiled from previous posts here.