Solved

Sage Payment Solutions - U.S.

Posted on 2014-03-27
9
288 Views
Last Modified: 2014-04-04
I'm looking for example code in ColdFusion.
It can be simple or advanced.
The type of code I'm looking for is the submitting of payment data for processing - ya know credit card info and an amount - then a response.
The company doesn't have exampe code in ColdFusion.

This is the company website (one of them)
http://go.na.sage.com/sage-payment-solutions-products-services?WT.srch=1&srch=google&gclid=CKX6ipjPsr0CFS1eOgodBWAACQ
0
Comment
Question by:dgrafx
  • 4
  • 4
9 Comments
 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39960558
Sage Payments solutions doesn't offer an open development platform, you have to enroll with them as a developer in order to access their API (and it seems they offer several options from side-to-side to full integration) before you can access their SDK.

I doubt you're going to find simple sample code to submit a payment to what appears a closed proprietary SDK platform.

http://na.sage.com/us/partners/payment-solutions#development
0
 
LVL 25

Author Comment

by:dgrafx
ID: 39960574
I am aware of this.
I have a developer account.
They don't have example code in ColdFusion is what the question revolved around.
Was hoping to find another developer who had some example code.

Thanks
0
 
LVL 52

Expert Comment

by:_agx_
ID: 39961700
(Edit)

(no points... I don't have an answer either)

I was holding off leaving a comment since threads with 0 responses tend to attract more attention, but ... now that there's activity on this thread:

You probably thought of this already, but what languages do they provide examples for - any C# or java? Might be easier to dissect / adapt either of those since CF can interop with either of those.
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 25

Author Comment

by:dgrafx
ID: 39961755
I've been aware that CF can do this for some time but have never done it.
Where in the docs is this? i.e. what tag(s) is that?

This would at least allow me to test and get a feel.
But the task that I'm charged with is to help with some CF code for the customer.
0
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 39961858
(EDIT: Added C# example)

Take a look at the createObject() docs.  

For the most part, it's pretty straight-foward. Just specify the object type ".net" or "java" and the path to the class you want to load. (Paths are case sensitive). With java objects, the jar needs to be added to the CF class path first. Easiest is to place them in WEB-INF\lib and restart CF. Then you'll have access to the classes:

             someObject = createObject("java", "path.to.your.ClassNameHere");

With .net objects, you supply the file path to the assemblies instead:

             someObject = createObject(".net"
                      , "path.to.your.ClassNameHere"
                      , "c:/path/to/yourAssemblyFile.dll"
             );

I've done some work with both types. It helps if you've have a little familiarity with either language. The java syntax is very similar. C# is a little different.  For example, in C# you can set/get properties directly like this:

          someObject.FavoriteFood = "popcorn";
          Console.WriteLine(someObject.FavoriteFood);

CF doesn't support that. Instead it creates Set_X/Get_X methods you use like this:              

         someObject.Set_FavoriteFood("popcorn");
         WriteDump(someObject.Get_FavoriteFood());

The biggest stumbling block w/both is getting used to the slight differences in syntax.  For example in java examples you'd see something like this:

       import java.util.Date;
 
       public  SomeClassName {
             
            Date dateVariable = new Date();

       }

You don't use imports in CF.  You supply the path to the class in the createObject call. Instead of "new ClassName()", you use the psuedo-constructor  "init". So in CF that code would be:

             dateVariable = createObject("java", "java.util.Date").init();
0
 
LVL 52

Expert Comment

by:_agx_
ID: 39961909
See updates to last post.

>  i.e. what tag(s) is that?
> Take a look at the createObject() docs.  

BTW, you can also use the tag based version <cfobject>, but personally I don't see any advantage to it. createObject() does the same thing and with java/c# code function calls are more natural. Especially when using cfscript rather than cfml.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 39962362
Hm.. just noticed the "Web Services" in the question tags. If the API you're trying to use a is web service of some kind, then it's entirely possible you don't need java/c# objects at all (beyond dissecting the examples). Most payment gateway web services are just a matter of posting the right parameters w/cfhttp, which is a lot easier.

Sounds like you're already getting help for that on your other thread.. If you do end up needing help w/any c# or java examples, let me know. Otherwise, feel free to delete this thread if Scott is be able to help you get you where you need to go with the xml stuff.
0
 
LVL 25

Author Comment

by:dgrafx
ID: 39962559
thanks
yes i'm mostly looking for simple how to as in this step first and this step second etc.

i appreciate it
0
 
LVL 25

Author Closing Comment

by:dgrafx
ID: 39978445
This provided me with some info that I had never dug into before ...
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lucee & <cftransaction.... />  WITAF? 10 25
Need a modeling tool 2 39
certificate error on website only in internal network 24 63
Level out logo and increase size? 16 23
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question