cancel
Showing results for 
Search instead for 
Did you mean: 

Direct Post PHP Customer Enters Amount

Hello,
I'm trying to find a sample of code where a user enters a unique payment amount from their invoice, then the amount entered is displayed on the next page above the fields for payment information. Everything I have tried so far gives me the invalid amount error.
Best regards,
Chris
zilther
Member
9 REPLIES 9

Hi,
 
There is not any sample code for this that we provide. When using Direct Post Method, the transaction amount must be collected to generate the fingerprint and so it takes place before any communication with Authorize.Net.
 
Thanks,
Joy
Joy
Administrator Administrator
Administrator

Hi Joy, I understand completely, just looking for a little help.

 

I am trying to store the $amount variable from a user entered field on one page, then pass that value to the page with the checkout form.  Could anyone help me with this? I'm assuming this is relatively easy to do, I just can't seem to make it work. 

@RaynorC1emen7

Thank you for the link, that worked perfectly.  I'm also trying to allow the customer to enter invoice and description fields.  Using x_invoice_num and x_description doesn't seem to work.  I found the note below in the docs, but I don't quite understand:

 

The invoice number must be
created dynamically on the
merchant server or provided on a
per-transaction basis. The
payment gateway does not
perform this function.
Also, in order to be included on
the hosted payment form, the
attribute View must be
configured for this field in the
Merchant Interface payment form
settings.

 

 

To clarify, these variables are passing between the pages without any problem.  When I receive the email reciept with the information entered, the invoice and description fields are still blank.  How do I capture that information during the transaction?

Did the invoice# and description show up on the merchant account transaction detail screen?

I'm honestly not sure where the merchant account transaction detail screen is located.

 

However, I got this working properly by adding hidden inputs to AuthorizeNetDPM.php:

 

<input type="hidden" name="x_invoice_num" VALUE="'.($_POST['invoiceNum']).'">
<input type="hidden" name="x_description" VALUE="'.($_POST['accountNumb']).'">

 

Also, I used cookies to get these variables (amount, invoice number, description) to show on the order reciept page.  Is that going to cause any PCI compliance issues?

 

 

Is that going to cause any PCI compliance issues?

it is ok. as long as there is no Credit Card info.

Thanks!