- shailesh.gusain.sfd1.3960741070027976E12
- NEWBIE
- 0 Points
- Member since 2014
-
ChatterFeed
-
0Best Answers
-
2Likes Received
-
0Likes Given
-
8Questions
-
8Replies
Authentication header for sage payment solutions
i am integrating salesforce with sage payement solutions gateway.
As per documentation: header value is made up of your M_ID and a HMAC of the request being made. The HMAC is a specific construction for calculating a message authentication code (MAC) involving a cryptographic hash function in combination with a secret cryptographic key. The result should be base 64 encoded for HTTP transport. The secret cryptographic key is your M_KEY.
HMAC = base64encode( H( K , m ) )
k = M_key
m = “POST” + URL + Message Body
like this:- HMAC = base64encode( hmacsha1( “ABCDEF123456” , “POST” + “https://gateway.sagepayments.net/web_services/gateway/api/healthcaretransactions” + “message body” ) )
M_id = 123456789012
header will be = ('Authentication', M_id+ ':'+lropGMzgNaomkwam+lNzYLH8rds=)
how to get it work in saleforce?
i am trying but getting 401 - Unauthorized.
Thanks in advance
As per documentation: header value is made up of your M_ID and a HMAC of the request being made. The HMAC is a specific construction for calculating a message authentication code (MAC) involving a cryptographic hash function in combination with a secret cryptographic key. The result should be base 64 encoded for HTTP transport. The secret cryptographic key is your M_KEY.
HMAC = base64encode( H( K , m ) )
k = M_key
m = “POST” + URL + Message Body
like this:- HMAC = base64encode( hmacsha1( “ABCDEF123456” , “POST” + “https://gateway.sagepayments.net/web_services/gateway/api/healthcaretransactions” + “message body” ) )
M_id = 123456789012
header will be = ('Authentication', M_id+ ':'+lropGMzgNaomkwam+lNzYLH8rds=)
how to get it work in saleforce?
i am trying but getting 401 - Unauthorized.
Thanks in advance
-
- shailesh.gusain.sfd1.3960741070027976E12
- December 15, 2014
- Like
- 0
- Continue reading or reply
Images break with salesforce 1 app.
I am implementing DHTMLX tree grid in salesforce. i am able to do it properly, but when i open this page in my salesforce 1 app. the images break as you can see in first image. has anybody implemented it before. should i use another libraries which supports images for mobile ?
-
- shailesh.gusain.sfd1.3960741070027976E12
- September 09, 2014
- Like
- 0
- Continue reading or reply
getting access token of google adwords
following code i am using to get acces token from GOOGLE ADWORDS it showing -error 400 with
grant_type:invalid
code:invalid
though my auth code is correct:
can anybody tell me what am i missing here?
public void AccessToken()
{
//Getting access token from google
redirect_uri = encodingutil.urlEncode(redirect_uri, 'UTF-8');
code = encodingutil.urlEncode(code , 'UTF-8');
secret = encodingutil.urlEncode(secret , 'UTF-8');
key = encodingutil.urlEncode(key, 'UTF-8');
HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setEndpoint('https://accounts.google.com/o/oauth2/token');
req.setHeader('content-type', 'application/x-www-form-urlencoded');
String messageBody = 'code='+code+'&client_id='+key+'&client_secret='+secret+'&redirect_uri='+redirect_uri+'&grant_type=authorization_code';
req.setHeader('Content-length', String.valueOf(messageBody.length()));
req.setBody(messageBody);
req.setTimeout(60*1000);
Http h = new Http();
String resp;
HttpResponse res = h.send(req);
resp = res.getBody();
System.debug(' You can parse the response to get the access token ::: ' + resp);
}
}
grant_type:invalid
code:invalid
though my auth code is correct:
can anybody tell me what am i missing here?
public void AccessToken()
{
//Getting access token from google
redirect_uri = encodingutil.urlEncode(redirect_uri, 'UTF-8');
code = encodingutil.urlEncode(code , 'UTF-8');
secret = encodingutil.urlEncode(secret , 'UTF-8');
key = encodingutil.urlEncode(key, 'UTF-8');
HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setEndpoint('https://accounts.google.com/o/oauth2/token');
req.setHeader('content-type', 'application/x-www-form-urlencoded');
String messageBody = 'code='+code+'&client_id='+key+'&client_secret='+secret+'&redirect_uri='+redirect_uri+'&grant_type=authorization_code';
req.setHeader('Content-length', String.valueOf(messageBody.length()));
req.setBody(messageBody);
req.setTimeout(60*1000);
Http h = new Http();
String resp;
HttpResponse res = h.send(req);
resp = res.getBody();
System.debug(' You can parse the response to get the access token ::: ' + resp);
}
}
-
- shailesh.gusain.sfd1.3960741070027976E12
- July 31, 2014
- Like
- 0
- Continue reading or reply
Intergration with google adwords
hello
I have a requirement to integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce. i just need a bit of help to start with code. we can integrate it with SOAP API. has anyone done it before?
Thanks in advance
Shailesh
I have a requirement to integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce. i just need a bit of help to start with code. we can integrate it with SOAP API. has anyone done it before?
Thanks in advance
Shailesh
-
- shailesh.gusain.sfd1.3960741070027976E12
- July 30, 2014
- Like
- 1
- Continue reading or reply
offline use
Hello everyone
I have a requirement to build a simple page which caches salesforce data when i go offline, and auto sync when i come online for moblie site. Can we do it with simple html 5 and javascript? what sort of javascript we will use? i dont want to use mobile sdk. is there any solution regarding this. i have build a page wgich can save data offline usiing offline.js but can not sync it back with salesforce.
Also can we use salesforce logged in session offline?
Regards
Shailesh Gusain
I have a requirement to build a simple page which caches salesforce data when i go offline, and auto sync when i come online for moblie site. Can we do it with simple html 5 and javascript? what sort of javascript we will use? i dont want to use mobile sdk. is there any solution regarding this. i have build a page wgich can save data offline usiing offline.js but can not sync it back with salesforce.
Also can we use salesforce logged in session offline?
Regards
Shailesh Gusain
-
- shailesh.gusain.sfd1.3960741070027976E12
- July 15, 2014
- Like
- 0
- Continue reading or reply
Error with Manifest attribute
hello
i am facing problem with manifest attribute in visualforce page. i want to use my page for offline usage i am on primary stage as with example provided by developer community. i wrote page as..
this my page which i will use offline
<apex:page doctype="html-5.0" manifest="/apex/CacheManifest" showheader="false" sidebar="false" standardstylesheets="false">
<header> <h1> Congratulations!</h1></header>
<article> This page looks almost like HTML5! </article>
<img src="/img/seasonLogos/2014_summer_aloha.png" />
</apex:page>
<!-- manifest page -->
<apex:page contentType="text/cache-manifest" applyHtmlTag="false" standardStylesheets="false" showHeader="false">
CACHE MANIFEST
#img
/img/seasonLogos/2014_summer_aloha.png
</apex:page>
but the error i have got in while inspecting the element is
Application Cache Error event: Failed to parse manifest
can anyone tell me where am i doing wrong?
Regards
Shailesh
i am facing problem with manifest attribute in visualforce page. i want to use my page for offline usage i am on primary stage as with example provided by developer community. i wrote page as..
this my page which i will use offline
<apex:page doctype="html-5.0" manifest="/apex/CacheManifest" showheader="false" sidebar="false" standardstylesheets="false">
<header> <h1> Congratulations!</h1></header>
<article> This page looks almost like HTML5! </article>
<img src="/img/seasonLogos/2014_summer_aloha.png" />
</apex:page>
<!-- manifest page -->
<apex:page contentType="text/cache-manifest" applyHtmlTag="false" standardStylesheets="false" showHeader="false">
CACHE MANIFEST
#img
/img/seasonLogos/2014_summer_aloha.png
</apex:page>
but the error i have got in while inspecting the element is
Application Cache Error event: Failed to parse manifest
can anyone tell me where am i doing wrong?
Regards
Shailesh
-
- shailesh.gusain.sfd1.3960741070027976E12
- July 09, 2014
- Like
- 0
- Continue reading or reply
Approval process for files and chatter feed
can we use approval process for chatter feeds and files? is it possible by anyway(through code)?please suggest.
-
- shailesh.gusain.sfd1.3960741070027976E12
- May 22, 2014
- Like
- 1
- Continue reading or reply
Has anyone integrated crowdflower with salesforce?
We have a requirement that when ever some one click pic in salesforce1 app it will be saved in amazon s3. but first it will go to the crowd flower for reviewing. can anyone suggest best way to integrate? i am trying it but getting http 301 status.
-
- shailesh.gusain.sfd1.3960741070027976E12
- April 25, 2014
- Like
- 0
- Continue reading or reply
Intergration with google adwords
hello
I have a requirement to integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce. i just need a bit of help to start with code. we can integrate it with SOAP API. has anyone done it before?
Thanks in advance
Shailesh
I have a requirement to integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce. i just need a bit of help to start with code. we can integrate it with SOAP API. has anyone done it before?
Thanks in advance
Shailesh
-
- shailesh.gusain.sfd1.3960741070027976E12
- July 30, 2014
- Like
- 1
- Continue reading or reply
Approval process for files and chatter feed
can we use approval process for chatter feeds and files? is it possible by anyway(through code)?please suggest.
-
- shailesh.gusain.sfd1.3960741070027976E12
- May 22, 2014
- Like
- 1
- Continue reading or reply
Getting "UNKNOWN_EXCEPTION, externalized text label not found, section: 'udd_HotOrganization' missing: [] " error on lead conversion
Hi Salesforce Developers,
I have a trigger that converts the leads that are being created by a specific user to accounts. There is a custom email field in lead which is mapped to a custom email field in account. My trigger works fine if at the time of lead creation there is no value in that email field but as soon as I populate that email field I get the following error:
caused by: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, "A trigger that updateds the account when the value in one of the account fields in changed" execution of AfterInsert
caused by: System.DmlException: Update failed. First exception on row 0 with id 00119000004OoUHAA0; first error: UNKNOWN_EXCEPTION, externalized text label not found, section: 'udd_HotOrganization' missing: []
We are using dupblocker in our org and I'm suspicious that this is happening becasuse there is a dupblocker scenario on the custom email field in account.
Does anybody have any resolutions/workarounds for this issue?
Thanks,
I have a trigger that converts the leads that are being created by a specific user to accounts. There is a custom email field in lead which is mapped to a custom email field in account. My trigger works fine if at the time of lead creation there is no value in that email field but as soon as I populate that email field I get the following error:
caused by: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, "A trigger that updateds the account when the value in one of the account fields in changed" execution of AfterInsert
caused by: System.DmlException: Update failed. First exception on row 0 with id 00119000004OoUHAA0; first error: UNKNOWN_EXCEPTION, externalized text label not found, section: 'udd_HotOrganization' missing: []
We are using dupblocker in our org and I'm suspicious that this is happening becasuse there is a dupblocker scenario on the custom email field in account.
Does anybody have any resolutions/workarounds for this issue?
Thanks,
- Vida Sadri 6
- January 06, 2015
- Like
- 0
- Continue reading or reply
getting access token of google adwords
following code i am using to get acces token from GOOGLE ADWORDS it showing -error 400 with
grant_type:invalid
code:invalid
though my auth code is correct:
can anybody tell me what am i missing here?
public void AccessToken()
{
//Getting access token from google
redirect_uri = encodingutil.urlEncode(redirect_uri, 'UTF-8');
code = encodingutil.urlEncode(code , 'UTF-8');
secret = encodingutil.urlEncode(secret , 'UTF-8');
key = encodingutil.urlEncode(key, 'UTF-8');
HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setEndpoint('https://accounts.google.com/o/oauth2/token');
req.setHeader('content-type', 'application/x-www-form-urlencoded');
String messageBody = 'code='+code+'&client_id='+key+'&client_secret='+secret+'&redirect_uri='+redirect_uri+'&grant_type=authorization_code';
req.setHeader('Content-length', String.valueOf(messageBody.length()));
req.setBody(messageBody);
req.setTimeout(60*1000);
Http h = new Http();
String resp;
HttpResponse res = h.send(req);
resp = res.getBody();
System.debug(' You can parse the response to get the access token ::: ' + resp);
}
}
grant_type:invalid
code:invalid
though my auth code is correct:
can anybody tell me what am i missing here?
public void AccessToken()
{
//Getting access token from google
redirect_uri = encodingutil.urlEncode(redirect_uri, 'UTF-8');
code = encodingutil.urlEncode(code , 'UTF-8');
secret = encodingutil.urlEncode(secret , 'UTF-8');
key = encodingutil.urlEncode(key, 'UTF-8');
HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setEndpoint('https://accounts.google.com/o/oauth2/token');
req.setHeader('content-type', 'application/x-www-form-urlencoded');
String messageBody = 'code='+code+'&client_id='+key+'&client_secret='+secret+'&redirect_uri='+redirect_uri+'&grant_type=authorization_code';
req.setHeader('Content-length', String.valueOf(messageBody.length()));
req.setBody(messageBody);
req.setTimeout(60*1000);
Http h = new Http();
String resp;
HttpResponse res = h.send(req);
resp = res.getBody();
System.debug(' You can parse the response to get the access token ::: ' + resp);
}
}
- shailesh.gusain.sfd1.3960741070027976E12
- July 31, 2014
- Like
- 0
- Continue reading or reply
Intergration with google adwords
hello
I have a requirement to integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce. i just need a bit of help to start with code. we can integrate it with SOAP API. has anyone done it before?
Thanks in advance
Shailesh
I have a requirement to integrate salesforce with google adwords. so that we can create ,run and stop a campaign through salesforce. i just need a bit of help to start with code. we can integrate it with SOAP API. has anyone done it before?
Thanks in advance
Shailesh
- shailesh.gusain.sfd1.3960741070027976E12
- July 30, 2014
- Like
- 1
- Continue reading or reply
offline use
Hello everyone
I have a requirement to build a simple page which caches salesforce data when i go offline, and auto sync when i come online for moblie site. Can we do it with simple html 5 and javascript? what sort of javascript we will use? i dont want to use mobile sdk. is there any solution regarding this. i have build a page wgich can save data offline usiing offline.js but can not sync it back with salesforce.
Also can we use salesforce logged in session offline?
Regards
Shailesh Gusain
I have a requirement to build a simple page which caches salesforce data when i go offline, and auto sync when i come online for moblie site. Can we do it with simple html 5 and javascript? what sort of javascript we will use? i dont want to use mobile sdk. is there any solution regarding this. i have build a page wgich can save data offline usiing offline.js but can not sync it back with salesforce.
Also can we use salesforce logged in session offline?
Regards
Shailesh Gusain
- shailesh.gusain.sfd1.3960741070027976E12
- July 15, 2014
- Like
- 0
- Continue reading or reply
Error with Manifest attribute
hello
i am facing problem with manifest attribute in visualforce page. i want to use my page for offline usage i am on primary stage as with example provided by developer community. i wrote page as..
this my page which i will use offline
<apex:page doctype="html-5.0" manifest="/apex/CacheManifest" showheader="false" sidebar="false" standardstylesheets="false">
<header> <h1> Congratulations!</h1></header>
<article> This page looks almost like HTML5! </article>
<img src="/img/seasonLogos/2014_summer_aloha.png" />
</apex:page>
<!-- manifest page -->
<apex:page contentType="text/cache-manifest" applyHtmlTag="false" standardStylesheets="false" showHeader="false">
CACHE MANIFEST
#img
/img/seasonLogos/2014_summer_aloha.png
</apex:page>
but the error i have got in while inspecting the element is
Application Cache Error event: Failed to parse manifest
can anyone tell me where am i doing wrong?
Regards
Shailesh
i am facing problem with manifest attribute in visualforce page. i want to use my page for offline usage i am on primary stage as with example provided by developer community. i wrote page as..
this my page which i will use offline
<apex:page doctype="html-5.0" manifest="/apex/CacheManifest" showheader="false" sidebar="false" standardstylesheets="false">
<header> <h1> Congratulations!</h1></header>
<article> This page looks almost like HTML5! </article>
<img src="/img/seasonLogos/2014_summer_aloha.png" />
</apex:page>
<!-- manifest page -->
<apex:page contentType="text/cache-manifest" applyHtmlTag="false" standardStylesheets="false" showHeader="false">
CACHE MANIFEST
#img
/img/seasonLogos/2014_summer_aloha.png
</apex:page>
but the error i have got in while inspecting the element is
Application Cache Error event: Failed to parse manifest
can anyone tell me where am i doing wrong?
Regards
Shailesh
- shailesh.gusain.sfd1.3960741070027976E12
- July 09, 2014
- Like
- 0
- Continue reading or reply
how to create webhook for salesforce from external system ..?
I need to create a webhook for salesforce in data insertion from external system(chargebee) for every event that occurs in chargebee that will hit the webhook URL to send notification in salesforce. any idea how to start on it...
- miku1051
- June 20, 2013
- Like
- 0
- Continue reading or reply