I am trying to add a gateway but am having issues.

I am trying to add a gateway but am having issues. By the way the statement that the gateway files are well documented is simply not what I am finding.

The gateway I am trying to add is Beanstream. It is a pretty straightforward gateway, nothing really special. The URL that I need to send when someone presses "Confirm" on the final order screen falls into this pattern:

https://www.beanstream.com/scripts/process_transaction.asp?merchant_id=123456789&requestType=BACKEND&trnType=P&trnOrderNumber=1234TEST&trnAmount=5.00&trnCardOwner=Joe+Test&trnCardNumber=4030000010001234&trnExpMonth=10&trnExpYear=10&ordName=Joe+Test&ordAddress1=123+Test+Street&ordCity=Victoria&ordProvince=BC&ordCountry=CA&ordPostalCode=V8T2E7&ordPhoneNumber=5555555555&ordEmailAddress=joe%40testemail.com

Question 1. What is the best gateway file to modify ? I am looking at the authenticate.net and the base one to try and understand where to start.

Question 2. Where can I see what is actually being submitted when someone presses confirm? Is there a terminal command of some sort ?

Question 3. Where do I set the text fields for the arguments? Such as "merchant_id". I do not see where I tell it the api_user "title" should be "merchant_id".

I have a good deal of other questions but if I could just get answers to these I am pretty sure I can figure out the rest.

Thank you in advance.

  • Alexander

    Hi @srdriggers,

    (1) Take a look at the manual payment gateway, and marketpress-gateway.php This is where you will find the comments, and basic documentation for the API.

    I think your biggest challenge is not having a library to interact with the API. Take a look at the stripe gateway. You'll see it's less than 500 lines, and much of that is just code reused from the interface.

    Using a library will help abstract the code used to connect to their API, and will make writing the gateway much easier. It will keep you from having to work directly with complicated URLs. Here's a PHP library I found for beanstream that might help you:

    https://github.com/mikejholly/beanstreamphp

    (2) Well, this is up to you. You have control over the form submission in your gateway. You're basically adding your own form, and handling all the processing for it. Then within that processing, you can trigger different MarketPress actions.

    (3) This is gateway specific, so it's not really something we can help with. Take a look at the PHP library I mentioned earlier. They have an easy way to setup your merchant credentials before each request.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.