1

I'm in a real pickle! I have a missing critical, overdue deadline to use a TouchNet Upay site to receive deposits via credit card. Desperate help is needed.

My code currently posts out to touchnet successfully and touchnet successfully receives a payment. At that point touchnet uses a post-back url that I have defined to receipt back the success of the payment with a transaction Id.

I create a rest resource to receive this post information which is proven accessible through postman (permissions have been set correctly).

TouchNet on the other hand can not see it, and logging backs this up, because they require a firewall rule in their firewall to allow the posting. They continually request a static IP to open up in their firewall.

The Salesforce community site I am running my rest endpoint is running through a CDN and only has an IP range. The IP ranges of Salesforce orgs is planely available, but they don't align what I am seeing coming from the domain my rest API lives under.

I have had a case in with Salesforce for a week and a ticket in with TouchNet for the last month. Both have made me reiterate my needs over an over. Let's see what this community can do!

Does anyone have any insight into what I might tell them for IP ranges?

Note: I did ask them to write a fully qualified domain rule in their firewall and so far they have refused to do that technique.

For those interested. Here is my very basic end point awaiting a data package of receipt information for which I will process and put into appropriate objects (not included yet)


@RestResource(urlMapping='/applicaitonpaymentreceive/*')
global with sharing class ApplicationPaymentRest {

    @HttpPost
    global static String receiptDeposit() {
        RestRequest req = RestContext.request;
        Map<String, String> params = req.params;

        if (String.isNotBlank(params.get('session_identifier'))) {
            String paymentStatus = params.get('pmt_status');
            System.debug('TouchNet Postback request headers: ' + JSON.serializePretty(req.headers));
            System.debug('TouchNet Postback parameters: ' + JSON.serializePretty(req.params));
            System.debug(params);
            system.debug(params.get('name_on_acct'));
        }

        return 'HTTP_OK';
    }

    @HttpGet
    global static String messageForGet() {
        return 'THIS ENDPOINT IS FOR POSTS ONLY';
    }

}
5
  • 2
    CDN's IPs will be dynamic by definition. The option you want is A non-Salesforce host or service serves this domain over HTTPS. This is technically challenging and given that you're still at "what are my IPs stage", you probably want a simpler solution. That would mean a forward proxy with a static IP running somewhere. TouchNet -> proxy -> Salesforce. There are lots of free/OSS proxies
    – identigral
    Commented Oct 19, 2022 at 18:29
  • 2
    ...or perhaps a simpler option: your Apex REST service can be made available under the "base" Salesforce org (foo.my.salesforce.com) rather than Experience site.
    – identigral
    Commented Oct 19, 2022 at 18:32
  • 1
    @identigral, why not post this as an answer? Commented Oct 19, 2022 at 18:44
  • @identigral, thanks for the suggestion. I'm working with my cloud architect to spin a proxy up in AWS. I'll let you know how it goes. I'm not sure how we would make a publically available rest service under the base domain though. Seems like some authentication would have to be involved. I was hoping this process would be easier as I have another open source project I would like to connect payments too.
    – Thad
    Commented Oct 19, 2022 at 18:55
  • 1
    @Thad Under the base domain, it wouldn't be public, you'd have to stuff some sort of authorization token into the request. Proxy on AWS will work.
    – identigral
    Commented Oct 19, 2022 at 19:15

0

You must log in to answer this question.

Browse other questions tagged .