Donation API Testing

Options

Is there some way of testing the donation API with non-real credit card numbers (i.e., using Visa's 411111111111111)? We are developing a new web app that uses the donation API and would prefer not to have to cancel/refund test transactions.

Tagged:

Comments

  • Other processors have a test mode, where the test numbers return approve responses. If there is no way to do this, how can we be sure our API applications are working properly?

  • JeremyGP :

    Other processors have a test mode, where the test numbers return approve responses. If there is no way to do this, how can we be sure our API applications are working properly?

    You can run the donation API in preview mode by specifying the argument df_preview=true in the POST arguments.

  • DavidHart :

    You can run the donation API in preview mode by specifying the argument df_preview=true in the POST arguments.

    What does this mean? Is this a new feature? Can fake credit card numbers be used? How will responses be different?

  • Robert Zakon:

    What does this mean? Is this a new feature? Can fake credit card numbers be used? How will responses be different?

    It is a previously undocumented feature, not a new one. You can use fake card numbers (4111 1111 1111 1111). All of the same validations are performed for required fields, etc. but the transaction is not passed to the payment processor and no updates are applied to the database. The responses that you get from the API are identical in the case of errors and for successes are identical to what you would get if a live transaction were processed except that some of the fields will have dummy values:

    <donationResponse xsi:schemaLocation="http://convio.com/crm/v1.0 " xmlns="http://convio.com/crm/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <donation>

    <amount>

    <decimal>120.00</decimal>

    <formatted>$120.00</formatted>

    </amount>

    <tax_deductible_amount>

    <decimal>0.00</decimal>

    <formatted>$0.00</formatted>

    </tax_deductible_amount>

    <value_of_goods>

    <decimal>0.00</decimal>

    <formatted>$0.00</formatted>

    </value_of_goods>

    <confirmation_code xsi:nil="true"/> <!-- would have data with a real transaction -->

    <date_time>1969-12-31T18:00:00.000-06:00</date_time> <!-- would have data with a real transaction --> <transaction_id>0</transaction_id> <!-- would have data with a real transaction --> <org_tax_id>fake tax id : 123456-789</org_tax_id>

    </donation>

    </donationResponse>

  • Hi David,


    I have been interested in learning more about the df_preview flag, and your description clears a lot of things up.


    However, I am curious as to exactly how similar the validation is. I am using the API to submit sustaining gift donations, and I want to be sure that the fields I am providing will set up the sustaining donations correctly. And whether or not the restrictions put in place from within the Donation form settings (e.g. donor screens) will be checked. Using df_preview, I am receiving no validation errors, but without seeing the transaction created in Luminate, it's hard to tell whether all is working properly.


    On a related note, is there any way to enable a sandbox/testing mode for a particular donation campaign or form (or even a particular center, in a multi-center site)? This would be for the purposes of building out an API integration to the donation functionality.


    Thanks
  • I found out more about validation in preview mode.


    If you also supply 'validation=true' with your submission, the submission will be more stricly validated. This also works with the df_preview flag.


    There is also no way to enable test mode for a particular center. Test mode is a per-site (global) setting.
  • Rod McTainsh:

    I found out more about validation in preview mode.


    If you also supply 'validation=true' with your submission, the submission will be more stricly validated. This also works with the df_preview flag.


    There is also no way to enable test mode for a particular center. Test mode is a per-site (global) setting.

    "More Strictly" - I believe it technically validates against the ghost form, so it will check to make sure data matches a field present on the form and is of the right type, choices match selection options, and so on.
  • You can run the donation API in preview mode by specifying the argument df_preview=true in the POST arguments.

    Last time I used this any appearance of df_preview in the args tripped the form into test mode. (Df_preview=false did not disable it.)

Categories