How to pass each call agent's extension code (who access SF via SSO under One Username) through to our Visualforce & Controller CallOut? - apex

How to pass each call agent's extension code (who access SF via SSO under One Username) through to our Visualforce Page and Apex Controller Call Out?
We already have the Visualforce Page and Call Out all set up but we need to know how to pass the Call Agent extension code to this.
We use an external call center to handle donation payments. The call center agent logs in under a single sign on but each agent is given a DIFFERENT extension code '123'. We have programmed a call recording for this call via a Visualforce page and POST Callout via a Controller.
For the purposes of security, we need to pause the call recording when the agent presses the Credit Card button on the Visualforce page ( all set up already and working). Plus we already have the capability to re-start the call recording when the credit details are put in. We just want to know how to pass the extension code into it.
Note that the user id address pops up on the page SF CallCenter Desktop (without extension code) and if the Call Agent moves to the Home Page button the user id page (without extension code) is lost and it becomes a general one. So maybe we need a way to populate the user id address with call agent the extension numbe??????
Or do we force the user to fill in a Ext field that populates the info on the page?
We do not use Omni Channel as we use an external call center who use a different system.
Any advice would be appreciated!
//Here is the line in VF page when agent presses CC button
Visualforce page:
<apex:commandButton rendered="{!AND(OR(callCenterUser, callCenter), mode='cc')}" value="Save and Make Credit Card Payment" action="{!doSave}"/>
<!-- <apex:commandButton rendered="{!AND(mode<>'activity',mode<>'resource',callCenter)}" value="Save and Add Direct Debit Details" action="{!d

Related

Yousign API: How to know if a procedure has been completely signed?

I'm using Yousign on my onboarding process to make my users sign a contract before accessing my application.
To achieve that:
On the YouSign UI, I manually create a new procedure from a template and copy the signature link (I get a URL like https://staging-app.yousign.com/procedure/sign?members=/members/a8xxxxxx)
I copy that link on my user account
When the user logs in, I open a modal and display the signature procedure in an iframe
When the users has signed on the iframe, I redirect him to a webpage where I trigger an event that closes the modal
At that stage, when the modal closes I'd like to check through a backend API call to YouSign API if the procedure has been fully signed.
But I can't find anything to do that in the API.
It seems I could use the GET /procedures/xxx method, but the Signature link does not contain any procedureID, only members IDs.
And there is no GET /members/xxx method, so I can't retrieve any procedure from there.
The use case of checking if a document has been signed seems pretty common for a e-signature API so I'm probably missing an obvious solution.

OctoberCMS: how to setup user account activation by email in Rainlab.User plugin?

I'm using Rainlab.User plugin with user activation via e-mail.
By default user receives an email with activation link "http://examples.com/register". So there is no activation code in it. How it is supposed to work at all?
Perhaps you forgot to set the url parameter on the page where the Account component is placed?
The page url needs something like: register/:code?
And the component settings must reflect that with the 'Activation Code Param' set to code as a normal string.

Paypal - Auto redirect after successful payment?

I want to redirect visitor automatically after successful payment. There are two options in Paypal and I am confused.
The first one (in the buy now button editing section)
The second one (in profile > my selling tools)
But in the second one, you can only select 1 url and that will be for all buy now buttons. That won't be good. What is the correct way to do that ?
To make the auto return works you first need to turn on the "Auto Return" in your PayPal Profile and you can specify any return url there . Now if you have the multiple return url's then you should specify the return url in your button code in the section "Take my customer to this url when they finish checkout " . In this way it will always override the return url that you have mentioned in your PayPal Profile .
Well, you can either set it account-wide or per button: in fact, you can do both - have an account-wide default and a selective override for selected buttons. There is a third way: define the return_url variable in the POST data for the button yourself: this is another per-button override.
Which you use is up to you.
Setting Up Auto Return Using PayPal
To set up Auto Return:
Log in to paypal and click Profile.
Click the Website Payment Preferences link under Selling Preferences.
Click the On radio button to enable Auto Return.
Enter the Return URL.
Note: You must meet the Return URL requirements in order to set up Auto Return. Learn more about Return URL.
Sendbox Form Multiple Return Request URL's : If you are using different URL's for success/failure
It will automatically overwrite paypal specified URL.

Implement Inbox Functionality in custom cq component?

We want to develop a smooth-flowing workflow experience (but still use workflows). Currently, a user needs to use the sidekick to initiate the workflow, then to the inbox, which takes them back to the page to use the sidekick again. When they go to the inbox, they need to restrict to the model and path of the page. It would be nice for the user to only have to go to the content page and from there, launch the different workflow forms that need to happen, like a little "inbox" right on the page that is subject to the workflow.
I have written a custom component that can initiate the custom workflow. The custom component can also query the WorkFlowSession and obtain any active WorkItems for the current page that the component resides (using the WorkItemFilter interface). What I want to do is provide a link to the user to the next step in the workflow from the custom component, just like the inbox does.
Here is an example output from an WorkItem instance toString method:
21.05.2014 09:45:29.300 *ERROR* [0:0:0:0:0:0:0:1%0 [1400679929160] GET /content/test/mailing1.html HTTP/1.1] org.rand.whatcounts.EmailCampaignCoordinator Found workitem: -----------------------------
WorkItem Id: /etc/workflow/instances/2014-05-21/model_1400679794564399000/workItems/node4_etc_workflow_instances_2014-05-21_model_1400679794564399000
Workflow Id: /etc/workflow/instances/2014-05-21/model_1400679794564399000
Payload: /content/test/mailing1
Payload Type: JCR_PATH
key = historyEntryPath value = /etc/workflow/instances/2014-05-21/model_1400679794564399000/history/1400679924113
key = comment value =
My hope is that by using the workflow api items, I can create the link that the user could click on to proceed in the workflow (just like the inbox).
Thanks for listening!
Phillip
There are two ways to implement this
Java-Based Solution
I was able to figure out one way by looking at
http://localhost:4502/libs/cq/workflow/components/inbox/list/json.jsp
The important part of this jsp is that, given a workItem instance, you can get the path for your next step using the JcrPathBuilderManager:
pathBuilder.getPath(wi);
Using this, I was able to output a link to the next step in the workflow to the user (without having user go to their inbox).
Javascript/JSON Based Solution
I didn't go far with this solution (I didn't write any js) but this was my fall back position if I didn't find the java-solution listed above. Once could implement custom JS in CQ Component that would call the json feed for the user inbox, do some client side filtering (to restrict it to only items related to current page). The URL to the feed is
http://localhost:4502/libs/cq/workflow/content/inbox/list.json?start=0&limit=40
Thanks!

Returning from PayPal to the page that called it

I am hoping someone can help me with the following. I have a Buy Now button on a child dialog. Buy Now button displays PayPal page correctly. Now I am trying to do I cannot find info on it. I would like PayPal to return to the child dialog with a variable that will indicate success (payment made) or failure (payment cancelled by buyer). Is this possible?
The flow works like this:
Member logs in to my site
Member makes purchase via paypal
Member is added to a raffle prize.
The child window (dialog) remains open as PayPal is opened in another page. Regardless of whether the payment is successful or cancelled/ failed I would like to return to the child window with a value indicating the result of the payment. If the result is a success then some code is performed. If not then nothing is done and the child window remains open.
Bruno
You need to add a return url input <INPUT TYPE="hidden" NAME="return" value="URLspecificToThisTransaction">, look here https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_formbasics under Setting The Return URL on Individual Transaction heading
You also need Instant Payment Notification – notify_url
Instant Payment Notification comprises three parts:
Someone pays you.
PayPal POSTs FORM variables to a URL you specify that runs a program to process the variables.
You validate the notification.
look here https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/ipnguide.pdf