• muralikrishna.sfdc
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 6
    Replies

please help me............

 

============================

when i submit this page it is redirecting and i am able to get rayment page from billdesk also.

 

after payment process billdesk will send responce.

 

 

my question is, how to get that responce ?

 

 

======================================

<apex:page Controller="paymentGateWay" sidebar="false" showHeader="false" >
 
 
 <html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Payment Gateway</title>
</head>
<body>
   

    <form name="frm" action="https://www.billdesk.com/pgidsk/pgmerc/baymentoption.jsp"
    method="post">


    <input type='hidden' name='txtCustomerID' value='{!txtCustomerID}'/><br></br>
    <input type='hidden' name='txtTxnAmount' value='{!txtTxnAmount}'/><br></br>
    <input type='hidden' name='txtAdditionalInfo1' value='55587'/>
    <input type='hidden' name='txtAdditionalInfo2' value='Bajaj Customer'/>
    <input type='hidden' name='txtAdditionalInfo3' value='T'/>
  
    <input type='hidden' name='RU' value='https://bsandboxpsbl--sanboxpsbl.cs5.my.salesforce.com' />
   
    </form>
    
</body>
<script type="text/javascript">
    document.forms["frm"].submit();
</script>
</html>
</apex:page>

===============================================

please help me............

 

============================

when i submit this page it is redirecting and i am able to get rayment page from billdesk also.

 

after payment process billdesk will send responce.

 

 

my question is, how to get that responce ?

 

 

======================================

<apex:page Controller="paymentGateWay" sidebar="false" showHeader="false" >
 
 
 <html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Payment Gateway</title>
</head>
<body>
   

    <form name="frm" action="https://www.billdesk.com/pgidsk/pgmerc/baymentoption.jsp"
    method="post">


    <input type='hidden' name='txtCustomerID' value='{!txtCustomerID}'/><br></br>
    <input type='hidden' name='txtTxnAmount' value='{!txtTxnAmount}'/><br></br>
    <input type='hidden' name='txtAdditionalInfo1' value='55587'/>
    <input type='hidden' name='txtAdditionalInfo2' value='Bajaj Customer'/>
    <input type='hidden' name='txtAdditionalInfo3' value='T'/>
  
    <input type='hidden' name='RU' value='https://bsandboxpsbl--sanboxpsbl.cs5.my.salesforce.com' />
   
    </form>
    
</body>
<script type="text/javascript">
    document.forms["frm"].submit();
</script>
</html>
</apex:page>

===============================================

Billdesk people are asking our end point to send the responce . how can we generate end point for taking responce.

 

my code is following like this

 

 

the retrun responce body will come  and replcaing old url  that means the html body is placing on ulr position,.  so I am getting error

 

my object is to open that result in new window like an page

 

//page code

 

<apex:page Controller="paymentGateWay">
  <script type="text/javascript">
function mypopup()
{
    mywindow = window.open("http://www.javascript-coder.com", "mywindow", "location=1,status=1,scrollbars=1,  width=100,height=100");
    mywindow.moveTo(0, 0);
}
  </script>
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >

<apex:inputText label="LoanApplication Number" value="{!LAN}"/>
<apex:inputText label="Amount" value="{!Amount}" />
<apex:commandButton value="Pay Now" immediate="true" action="{!goForPay}" onclick="window.open('mypopup');" />



</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>    
</apex:page>

 

 

 

 

 

 

// class code

 

 public class paymentGateWay {

 public string LAN{get;set;}
 public string Amount{get;set;}
 public string LAND{get;set;}
 public string typeOfCard ='creditcard';
   
  public string goForPay() {
   
 // paymentprocess1 pay =new paymentprocess1();
 // pay.paymentprocess1m(LAN,Amount);
 
   string sessionid = UserInfo.getSessionId();
   string body='?txtCustomerId='+LAN+'&txtTxnAmount='+Amount;
   string body2= EncodingUtil.urlEncode(body, 'UTF-8');  
   
 
   // create http object
    Http h = new Http();

  // creating https request
       HttpRequest req = new HttpRequest();
         req.setEndpoint('https://www.billdesk.com/pgidsk/pgmerc/BAJAJFINPaymentoption.jsp'+body);
         req.setMethod('GET');
       
    HttpResponse res = h.send(req);
    return res.getBody();
        
     system.debug('FFFFFFFFFF'+res.getBody());
      

    }
}

I am working under payment gateway , I am new to this

 

 

is it require to encode for sending our request .

 I have to  send four things through this

 

session id , application number , amount, type of process

 

first one is how to get session id in salesforce

 

after encoding ,is it the right process add each one and attach to the endpoint at the end..

 

please help me

I am working under payment gateway , I am new to this

 

 

is it require to encode for sending our request .

 I have to  send four things through this

 

session id , application number , amount, type of process

 

first one is how to get session id in salesforce

 

after encoding ,is it the right process add each one and attach to the endpoint at the end..

 

please help me

Hi,

 

I have two questions, i am trying to figure it out for a long time, please help me.

 

Below is my apex code,

 

public class Dev_Login{
    public String userName {get; set;}
    public String password {get; set;}
    public String outputText {get; set;}
    
    public Dev_Login() {
        
    }    
    
    public void loginFn() {

        Http http = new Http();
        HttpRequest req = new HttpRequest();
        HttpResponse res;
        try {        
            req.setEndpoint('https://www.mywebsite.com/jsp');
            req.setHeader('Content-Type', 'application/x-www-form-urlencoded');      
            req.setMethod('POST');
            String theMessage = 'userId='+userName+'&password='+password;            
            
            req.setBody(theMessage);
            
            res = http.send(req);
            
            outputText = res.getBody();
            
        } catch (Exception e) {
            System.debug('Error'+e);
        }
    }
}

 

 

the response (res.getBody()) will contain a HTML content, i want to display it in the VF Page that contains the login button. How should i do it? i had the below in my vf page

 

<apex:outputpanel >
        <apex:outputtext rendered="true" value="{!outputText}"/>
    </apex:outputpanel>

 

But this just displayed the html content as a string, didnt render it as html.. Please tell me how should i do it?

 

-----------------------------------------------

 

My second question,

 

say if i get an XML in the response in this page (outputText)

i want to redirect to a new VF page where i will use that xml to display something... how should i pass this xml to that new page. that newpage will use a different controller..  so i want to pass this xml to the second page's controller and second page should be displayed... how should i do it.

 

Please help me with these two questions..

 

Thanks,

Rani

  • March 02, 2011
  • Like
  • 0

Hello,

 

I have a future callout from a time-based trigger. This callout in turn calls a Visualforce page.

On the trigger, UserInfo.getSessionId() returns null, hence the page does not get invoked; the Http callout hits the Salesforce.com login page. Please suggest a way to obtain the sessionid on a Apex trigger invoked by a Time based workflow?

 

What is the validity time for a SFDC sessionid?

 

Andi Giri

Softsquare

www.softsquare.biz

I have created a trigger which is calling an external web service to synchronize the leads creation/deletion process. When i delete/create leads the web service is working fine but when i mass upload it(mass import process..) or mass delete process (when it reaches its max limit..i.e. 250) it throws an exception and an error mail is generated with this error "System.CalloutException: IO Exception: Read timed out" error. I have also added the timeout_x property in my code to the max value(60000). But still its throwing the same error. Kindly help. Thanks in advance. Shaveta

I am getting this error while creating apex from WSDL.

 

Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}string

 

this is my wsdlfrom axis2 web service), someone help me?

 

<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/isms/" targetNamespace="http://www.example.org/isms/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema targetNamespace="http://www.example.org/isms/">
<s:element name="isms">
<s:complexType>
<s:sequence>
<s:element name="in" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ismsResponse" type="s:string" />
<s:element name="ismsRequest" type="s:string" />
</s:schema>
</wsdl:types>
<wsdl:message name="ismsRequest">
<wsdl:part name="parameters" element="tns:ismsRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="ismsResponse">
<wsdl:part name="parameters" element="tns:ismsResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="isms">
<wsdl:operation name="isms">
<wsdl:input message="tns:ismsRequest">
</wsdl:input>
<wsdl:output message="tns:ismsResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ismsSOAP" type="tns:isms">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="isms">
<soap:operation soapAction="http://www.example.org/isms/isms"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="isms">
<wsdl:port name="ismsSOAP" binding="tns:ismsSOAP">
<soap:address location="http://172.168.2.235:8080/axis2/services/isms/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

 

Message Edited by china.leaf on 04-23-2009 01:48 AM
Message Edited by china.leaf on 04-23-2009 02:15 AM
Message Edited by china.leaf on 04-23-2009 02:16 AM