You are not authorized to view this page. The transaction has not been processed. Hosted Payments Page - BoA - Stack Overflow

admin2025-04-23  6

Trying to implement Bank of America - Hosted Payments Page

Here is the Integration Guide (pg 28)

I followed the ASP.NET Example, and got the error:

It should redirect to the Hosted Payments Page.

The implementation is very simple, just update 3 fields:

In payment_form.aspx

<input type="hidden" name="access_key" value="<REPLACE WITH ACCESS KEY>">
<input type="hidden" name="profile_id" value="<REPLACE WITH PROFILE ID>">

and in Security.cs

private const String SECRET_KEY = "<REPLACE WITH SECURITY KEY>";

so even just updating these values causes a 403 error when redirecting to the Hosted Payments Page.

Trying to implement Bank of America - Hosted Payments Page

Here is the Integration Guide (pg 28)

I followed the ASP.NET Example, and got the error:

It should redirect to the Hosted Payments Page.

The implementation is very simple, just update 3 fields:

In payment_form.aspx

<input type="hidden" name="access_key" value="<REPLACE WITH ACCESS KEY>">
<input type="hidden" name="profile_id" value="<REPLACE WITH PROFILE ID>">

and in Security.cs

private const String SECRET_KEY = "<REPLACE WITH SECURITY KEY>";

so even just updating these values causes a 403 error when redirecting to the Hosted Payments Page.

Share Improve this question edited Jan 20 at 16:11 Robert Green MBA asked Jan 19 at 22:06 Robert Green MBARobert Green MBA 1,8863 gold badges29 silver badges56 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 1

Looking at the example code, I don't believe it will work out of the box with only the changes you listed.

In payment_form.js, it is setting the transaction_type to "authorization", but the form does not include all the required fields for "authorization". You would need to look at all the request fields in section 27.2 starting on page 40 and add every field that is listed as required for authorization to the form and update the signed field value. At quick glance, you would likely need to add the following:

  • bill_to_address_city
  • bill_to_address_country
  • bill_to_address_line1
  • bill_to_address_ postal_code
  • bill_to_address_state
  • bill_to_email
  • bill_to_forename
  • bill_to_surname

Two other things to try if it still doesn't work after the above changes.

1) Make sure you are using TLS 1.2

  • Upgrade the sample code project to .NET 4.6.2.
  • Make sure to add <httpRuntime targetFramework="4.6.2" /> to the <system.web> section of the web.config.

2) Update the urls to the new ones from page 31.

  • In payment_confirmation.aspx, change the form action to "https://testsecureacceptance.merchant-services.bankofamerica.com/pay"
转载请注明原文地址:http://anycun.com/QandA/1745389017a90643.html