Skip to main content

I'm having trouble adding payments to a Summit Events registration page, and need help. 

 

I have filled in the Payment Gateway fields on the Summit Event record, and have it successfully redirecting the registration to a payment page I built. However, when I click the "submit" button on my payment page and try to redirect back to the Summit Events registration page, I get an error saying I can't see the Summit Events page that I'm trying to access in the community and I don't know what to do about it. 

 

What page should I be redirecting to when I'm done, and what method should I be doing to get to that page? Currently what I'm trying is using the encrypted cookie from the browser as recommended here. I have also looked the sample recipe from @Thaddaeus Dahlberg that is located here.

 

String encryptedEventInfo = EncodingUtil.urlEncode(getSeaCookie(false), 'UTF-8'); // This just returns the "SummitEvents" cookie, still encrypted

PageReference pageRef = new PageReference(Site.getBaseSecureUrl() + '/summit__SummitEventsConfirmation?eventInfo=' + encryptedEventInfo);

pageRef.setRedirect(true);

return pageRef;

6 respuestas
  1. 19 ago, 17:57

    Hey @Matthew Hubert!

     

    I think I see the gap. Are you redirecting straight from your payment page back into summit__SummitEventsConfirmation? If so, that's likely part of it (though in theory what you did should work). 

     

    I'm going to reference later this TouchNet UPay gateway I built out. I think you are looking at the old SOAP connection one which I'm unsure if it still works. Here is the new repo: 

     

    https://github.com/tcdahlberg/Summit-Events-App-TouchNet-UPay

     

    In every payment integration I've built for SEA, I've always used a dedicated Callback page as the landing spot after the gateway is done, rather than sending the browser straight into the packaged confirmation page. There's a good reason for this beyond just cleanliness: SEA is a managed package, and by Salesforce's design you can't see inside its execution or its error handling so if something goes wrong on the packaged confirmation page, all you get back is a generic, unhelpful "you don't have access" message with no way to debug it further. 

     

    A page you own gets you real visibility, and gives you options SEA's own pages don't:

    • Before redirecting anywhere, decrypt and inspect the SEA cookie yourself to confirm the registration state actually made it through the round trip intact.
    • If you find something wrong at that point, you can redirect to SEA's Submit page and pass an error message as a URL parameter (?error='this is an error), so the registrant sees something meaningful instead of a dead end.
    • Once things check out, redirect on into summit__SummitEventsConfirmation as normal.

    I use a similar pattern in my TouchNet UPay connector  (not Authorize.net), but the cookie/token handling is useful as a reference in the class UPayHelper.cls:

     

    • getSeaCookie(true) reads and decrypts the SummitEvents cookie directly
    • getSummitEventsInfo() deserializes that into a wrapper with registrationId, eventId, instanceId, audience, and dt — so you can log/inspect exactly what SEA thinks the registration state is, right before you decide where to send the user next

    If the cookie comes back empty or malformed on your Callback page, that's your root cause. If it's intact, you've got real data to work with instead of guessing at what happened inside the packaged confirmation page. 

     

    I hope maybe this helped but am willing to carry on the conversation here or DM me if you want to meet. 

     

    Thanks!

0/9000