cancel
Showing results for 
Search instead for 
Did you mean: 

Sandbox Accept page testing- always declined?

I’m attempting to test Accept Hosted payment pages with my sandbox.  For this, I’m using the GetAnAcceptPaymentPage from the C# sample code application to generate a token string for a payment, having first edited the RunMethod function in SampleCode.cs to specify the apuLoginId and transactionKey for my sandbox, and setting $1.00 as the amount. I’m then posting the returned token string to https://test.authorize.net/payment/payment with a “token” form element containing that string.  This much appears to be working, and I do get a payment page showing the $1.00 amount.  However, no matter what values I enter onto that payment page, pressing the “Pay” button just shows “The transaction has been declined.” in red text at the bottom of the form.  I’ve confirmed that my sandbox is set to “Live” mode, and have looked at the following link to use what I believe should be valid values for testing: https://developer.authorize.net/hello_world/testing_guide/.  I'm hoping someone can tell me why I can't get any result other than "The transaction has been declined".

 

Edit: I tried to include a screenshot showing the form values, but the forum won't accept it, so here are the values as text:

 

Amount: $1.00

Card #: 5424 0000 0000 0015

Exp date: 08/18

Card code: 900

First name: David

Last name: Tester

Country: USA

ZIP: 46214

Address: 123 Test St

City: Indianapolis

State: IN

Phone: 952-925-9252

dsandberg
Contributor
11 REPLIES 11

Hello,

 

I just tested in Sandbox environment using the data you provided, but cannot repro the issue.

 

Could you please follow

https://developer.authorize.net/api/reference/#payment-transactions-charge-a-credit-card

and try to send a createTransactionRequest using your data through

https://apitest.authorize.net/xml/v1/xmltest.htm, and see what response you get?

 

If you also get transaction declined there, you can send us the transId and error code, so that we can further investigate and help.

 

Thanks,

Angie

 

angie
Authorize.Net Developer Authorize.Net Developer
Authorize.Net Developer

I'm just now getting back to evaluating Authorize.net after several months of putting out unrelated fires, and I am still running into the same problem as listed above.

 

This time I have tried using the sample request form at the following URL to generate a token, only modifying the sample request to add my sandbox keys:

 

https://developer.authorize.net/api/reference/#payment-transactions-get-an-accept-payment-page

 

Then I submitted the resulting token to the following URL:

 

https://test.authorize.net/payment/payment

 

This gave me the expected hosted pay page.  On this page I have tried entering several of the test CC numbers listed in the "Test Card Numbers" section of the following page:

 

https://developer.authorize.net/hello_world/testing_guide/

 

I specified future dates (e.g., 12/20) and a card code of 999.  And in every case the response I get on the hosted pay page is "The transaction has been declined."

 

Please note that using a different API for testing is of no value to us, as we are only interested in the Accept Hosted Pay Page method.  What we need to be able to do is get a successful transaction that displays a receipt page, as the latter is actually what we are in need of seeing and trying to modify right now.

Can you check if you are not using any amount or zip code from https://developer.authorize.net/hello_world/testing_guide/ which may be triggering the decline ?

 

Thanks





Send feedback at developer_feedback@authorize.net

 wrote:

Can you check if you are not using any amount or zip code from https://developer.authorize.net/hello_world/testing_guide/ which may be triggering the decline ?

 


 

Thanks for the response.

 

No, I hadn't been using any of the documented values on that page (other than the CC numbers).  I was using the default request amount of $20.00 (my understanding being that any amount under $100 should result in an approval on the test server), the default request zip code of 44628, and a 3-digit code of 999.

Even though it isn't applicable to our intended usage, as a test I created a request using the Charge A Credit Card API example that you linked above, with the default values given in the example, and adding our sandbox keys into it.  That request succeeded in charging a test payment of $5.  I then took that same information and amount, and plugged it into the "Get An Accept Payment Page" API example (see below), using the resulting token to bring up a hosted payment page, into which I entered the same credit card information as in the first request.  As reported before, that results in the message "The transaction has been declined."  Why are these two test APIs giving different results when provided with the same payment info?

 

Below is the exact XML I used for getting the token (except for having removed our sandbox keys for obvious reasons), along with the CC information that I entered into the hosted page.

 

CC#: 5424000000000015

ExpDate: 12/20

Code: 999

 

<getHostedPaymentPageRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
  <merchantAuthentication>
    <name></name>
    <transactionKey></transactionKey>
  </merchantAuthentication>
  <transactionRequest>
    <transactionType>authCaptureTransaction</transactionType>
    <amount>5</amount>
    <profile>
      <customerProfileId>123456789</customerProfileId>
    </profile>
    <customer>
      <email>ellen@mail.com</email>
    </customer>
    <billTo>
        <firstName>Ellen</firstName>
        <lastName>Johnson</lastName>
        <company>Souveniropolis</company>
        <address>14 Main Street</address>
        <city>Pecan Springs</city>
        <state>TX</state>
        <zip>44628</zip>
        <country>USA</country>
    </billTo>
  </transactionRequest>
  <hostedPaymentSettings>
    <setting>
      <settingName>hostedPaymentReturnOptions</settingName>
      <settingValue>{"showReceipt": true, "url": "https://mysite.com/receipt", "urlText": "Continue", "cancelUrl": "https://mysite.com/cancel", "cancelUrlText": "Cancel"}</settingValue>
    </setting>
    <setting>
      <settingName>hostedPaymentButtonOptions</settingName>
      <settingValue>{"text": "Pay"}</settingValue>
    </setting>
    <setting>
      <settingName>hostedPaymentStyleOptions</settingName>
      <settingValue>{"bgColor": "blue"}</settingValue>
    </setting>
    <setting>
      <settingName>hostedPaymentPaymentOptions</settingName>
      <settingValue>{"cardCodeRequired": false, "showCreditCard": true, "showBankAccount": true}</settingValue>
    </setting>
    <setting>
      <settingName>hostedPaymentSecurityOptions</settingName>
      <settingValue>{"captcha": false}</settingValue>
    </setting>
    <setting>
      <settingName>hostedPaymentShippingAddressOptions</settingName>
      <settingValue>{"show": false, "required": false}</settingValue>
    </setting>
    <setting>
      <settingName>hostedPaymentBillingAddressOptions</settingName>
      <settingValue>{"show": true, "required":false}</settingValue>
    </setting>
    <setting>
      <settingName>hostedPaymentCustomerOptions</settingName>
      <settingValue>{"showEmail": false, "requiredEmail": false, "addPaymentProfile": true}</settingValue>
    </setting>
    <setting>
      <settingName>hostedPaymentOrderOptions</settingName>
      <settingValue>{"show": true, "merchantName": "G and S Questions Inc."}</settingValue>
    </setting>
    <setting>
      <settingName>hostedPaymentIFrameCommunicatorUrl</settingName>
      <settingValue>{"url": "https://mysite.com/special"}</settingValue>
    </setting>
  </hostedPaymentSettings>
</getHostedPaymentPageRequest>

 

 

dsandberg
Contributor

Is there any investigation taking place on this issue?  This has completely blocked our attempts to determine whether Authorize.net is a suitable candidate for our company's payment provider, and since a decision is likely to need to be made soon, not being able to complete our investigation would inevitably force us to look elsewhere for such services.

Hi @dsandberg

 

Can you have a look at our Accept sample app https://github.com/AuthorizeNet/accept-sample-app ?

 

If its dont help can you reach out at developer_feedback@authorize.net ?

 

Thanks





Send feedback at developer_feedback@authorize.net

The problem with your accept-sample-app code is that it is all PHP, which we don't have any knowledge of ... we are a .NET shop.  I have already tried the GetAnAcceptPaymentPage code from the C# sample code application (also from github), and I had exactly the same problem with that.  When I emailed for assistance at developer@authorize.net, they told me they couldn't help and that I had to submit my questions via the forum.

 

I will try emailing this different email address, but if I get directed back to the forum again by them, I'm going to recommend to the decision makers at my company that we remove Authorize.net from the short list of candidates for our payment provider.

Hello,

 

We are very curious if you were able to resolve this issue.  We are having a similar experience.

 

) When using the API 'Live Console' from https://developer.authorize.net/api/reference/#payment-transactions-charge-a-credit-card, our Sandbox credentials and test data successfully create a transaction.

 

) When using the same credentials from the API 'Live Console' from https://developer.authorize.net/api/reference/#accept-suite-get-an-accept-payment-page, we get a Success response and token returned.

 

) When using the same credentials and the same test data with the Accept Hosted sample code from https://developer.authorize.net/api/reference/features/accept_hosted.html, we successfully get the token back but also receive the 'The transaction has been declined' message with no further details, although no declined transactions are reported in the Merchant Interface.

 

We have checked the following from the last link above, and nothing there is checked Required: 

 

Note: Authorize.Net has Payment Form settings that do not currently affect field visibility in Accept Hosted but that might cause transaction errors because unsent fields are marked as required. To avoid errors caused by required fields, log in to the Merchant Interface as Account Administrator, navigate to Account > Settings > Transaction Format Settings > Payment Form > Form Fields, and uncheck Required for all fields. Note that if you use the deprecated SIM payment form, these settings will impact the fields that SIM requires. 

 

If you or anyone else has advice on resolving this or somehow getter further error details, we would very much appreciate it. 

 

Thanks in advance,

Dais