Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //- Redirect to the Obsidian Registration Block based on Gateway tied to Registration Template
- {% assign registrationInstanceId = PageParameter['RegistrationInstanceId'] | SanitizeSql %}
- {% assign eventOccurrenceId = PageParameter['EventOccurrenceID'] | SanitizeSql %}
- {% assign slug = PageParameter['Slug'] | SanitizeSql %}
- {% assign registrationId = PageParameter['RegistrationId'] | SanitizeSql %}
- {% assign redirect = false %}
- //- Handle redirects for individuals in process of registering
- {% if registrationInstanceId and registrationInstanceId != empty %}
- //- Fetching Registration Instance Based in registrationInstanceId <BR>
- //- securityenabled:'false' the end user might not have access to this object
- {% registrationinstance id:'{{registrationInstanceId}}' securityenabled:'false' %}
- {% assign gatewayid = registrationinstance.RegistrationTemplate.FinancialGatewayId %}
- //- MyWell Gateway = 4
- {% if gatewayid == 4 %}
- {% assign redirect = true %}
- {% capture urlRedirect %}{{ 'Global' | Attribute:'PublicApplicationRoot' }}page/811?RegistrationInstanceId={{registrationInstanceId}}&EventOccurrenceID={{eventOccurrenceId}}&Slug={{slug}}{% endcapture %}
- {% endif %}
- {% endregistrationinstance %}
- {% endif %}
- //- Handle redirect for individuals who have already registered and are returing to submit payment
- {% if registrationId and registrationId != empty %}
- //-Fetching Registration Instance Based in registrationId <BR>
- //- securityenabled:'false' the end user might not have access to this object
- {% registration id:'{{registrationId}}' securityenabled:'false' %}
- {% assign gatewayid = registration.RegistrationInstance.RegistrationTemplate.FinancialGatewayId %}
- //- MyWell Gateway = 4
- {% if gatewayid == 4 %}
- {% assign redirect = true %}
- //- Obsidian Registration Page = 811
- {% capture urlRedirect %}{{ 'Global' | Attribute:'PublicApplicationRoot' }}page/811?RegistrationId={{registrationId}}{% endcapture %}
- {% endif %}
- {% endregistration %}
- {% endif %}
- {% if redirect == true %}
- //- RockAdmin
- {% assign isInRole = CurrentPerson | IsInSecurityRole: 2 %}
- {% if isInRole == true %}
- Redirecting to: <pre>{{ urlRedirect }}</pre>
- {% else %}
- {{ urlRedirect | PageRedirect }}
- {% endif %}
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement