Announcement

Collapse
No announcement yet.

Timeout Error when posting to FaaS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Timeout Error when posting to FaaS

    I am trying to post a test transaction to the Forms as a Service for the first time, and I am getting a Timeout error. I am posting from a secure URL, but after hanging for a few seconds, the web service returns with a Timeout Error. No other details are given or indications of why it timed out. So I'm pretty clueless as to what I am doing wrong. Can someone please look at this see if there is something wrong with how I am posting to it?

    I'm going to include the server logs output and a code snippet below.

    First, here are the server logs. I am writing out the actual XML that is being posted to the console, and you see the Timeout Error at the bottom:

    2013-04-30T16:10:26.349084+00:00 app[web.2]: '<CnPAPI xmlns="urn:APISchema.xsd">
    2013-04-30T16:10:26.349084+00:00 app[web.2]: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2013-04-30T16:10:26.349084+00:00 app[web.2]: XML to post:
    2013-04-30T16:10:26.349084+00:00 app[web.2]: <Engine>
    2013-04-30T16:10:26.349084+00:00 app[web.2]: <Request>
    2013-04-30T16:10:26.349084+00:00 app[web.2]: <Operation>
    2013-04-30T16:10:26.349084+00:00 app[web.2]: <Version>12</Version>
    2013-04-30T16:10:26.349084+00:00 app[web.2]: <OperationType>Transaction</OperationType>
    2013-04-30T16:10:26.349084+00:00 app[web.2]: Going to post to: https://paas.cloud.clickandpledge.co...rvice.svc?wsdl
    2013-04-30T16:10:26.349084+00:00 app[web.2]: <IPAddress>75.115.250.126</IPAddress>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: <Authentication>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: <AccountGuid>[MyGUID]</AccountGuid>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: </Operation>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: </Authentication>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: <Order>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: <AccountID>[MyAccountID]</AccountID>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: <CardHolder>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: <BillingFirstName>Arin</BillingFirstName>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: <OrderMode>Test</OrderMode>
    2013-04-30T16:10:26.349404+00:00 app[web.2]: <BillingInformation>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: <BillingEmail>[email protected]</BillingEmail>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: <BillingAddress>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: <BillingAddress1>Post Office Box 1000</BillingAddress1>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: <BillingMI>W</BillingMI>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: <BillingAddress2></BillingAddress2>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: <BillingLastName>Sime</BillingLastName>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: <BillingAddress3></BillingAddress3>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: <BillingCountryCode>840</BillingCountryCode>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: </BillingInformation>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: <BillingCity>Blacksburg</BillingCity>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: <BillingStateProvince>VA</BillingStateProvince>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: <PaymentMethod>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: <PaymentType>CreditCard</PaymentType>
    2013-04-30T16:10:26.349654+00:00 app[web.2]: <BillingPhone>123.456.7890</BillingPhone>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: </BillingAddress>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: <NameOnCard>Arin Sime</NameOnCard>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: <Cvv2>123</Cvv2>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: <CardNumber>4111111111111111</CardNumber>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: </PaymentMethod>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: <BillingPostalCode>12346-4563</BillingPostalCode>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: <ExpirationDate>04/15</ExpirationDate>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: </CreditCard>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: <OrderItemList>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: </CardHolder>
    2013-04-30T16:10:26.349903+00:00 app[web.2]: <CreditCard>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: <UnitDeductible>1000</UnitDeductible>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: </OrderItem>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: <OrderItem>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: <Quantity>1</Quantity>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: <UnitPrice>1000</UnitPrice>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: <Receipt>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: <SendReceipt>true</SendReceipt>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: <ItemID>1</ItemID>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: </OrderItemList>
    2013-04-30T16:10:26.350156+00:00 app[web.2]: <ItemName>Donation</ItemName>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: <WID>[MyWID]</WID>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: <Transaction>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: </Receipt>
    2013-04-30T16:10:26.350645+00:00 app[web.2]: <TotalDeductible>1000</TotalDeductible>
    2013-04-30T16:10:26.350645+00:00 app[web.2]: <Total>1000</Total>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: <TransactionType>Authorize</TransactionType>
    2013-04-30T16:10:26.350645+00:00 app[web.2]: </CurrentTotals>
    2013-04-30T16:10:26.350645+00:00 app[web.2]: </Transaction>
    2013-04-30T16:10:26.350400+00:00 app[web.2]: <CurrentTotals>
    2013-04-30T16:10:26.350645+00:00 app[web.2]: </Order>
    2013-04-30T16:10:26.350645+00:00 app[web.2]: </Request>
    2013-04-30T16:10:26.350645+00:00 app[web.2]: </CnPAPI>'
    2013-04-30T16:10:26.350645+00:00 app[web.2]: </Engine>
    2013-04-30T16:09:58.170161+00:00 heroku[router]: at=info method=GET path=/list/AHIP/39 host=www.wishlisting.org fwd="67.51.76.53" dyno=web.1 connect=2ms service=71ms status=200 bytes=14645
    2013-04-30T16:11:26.426943+00:00
    app[web.2]: app/controllers/donations_controller.rb:150:in `create'
    2013-04-30T16:11:26.426943+00:00 app[web.2]:
    2013-04-30T16:11:26.426943+00:00 app[web.2]: Timeout::Error (Timeout::Error):
    2013-04-30T16:11:26.426943+00:00 app[web.2]:
    2013-04-30T16:11:26.426943+00:00 app[web.2]:
    2013-04-30T16:11:26.426943+00:00 app[web.2]: app/controllers/donations_controller.rb:150:in `block in create'
    2013-04-30T16:11:26.427217+00:00 app[web.2]: Completed 500 Internal Server Error in 60089ms
    2013-04-30T16:11:26.427217+00:00 app[web.2]: Processing by DonationsController#create as HTML

    Now, here is the Ruby code that I am using to make the post (note that I am using some hardcoded values in the XML right now):

    #Send the user to the Click and Pledge Form as a Service
    url= URI.parse('https://paas.cloud.clickandpledge.com/PaymentService.svc?wsdl')
    puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
    puts "Going to post to: #{url}"
    request = Net::HTTP::Post.new(url.path)
    request.add_field 'Content-Type', 'application/xml'
    request.body = %Q{'<CnPAPI xmlns="urn:APISchema.xsd">
    <Version>12</Version>
    <Engine>
    <Request>
    <Operation>
    <OperationType>Transaction</OperationType>
    <IPAddress>75.115.250.126</IPAddress>
    </Operation>
    <Authentication>
    <AccountGuid>[My guid was here]</AccountGuid>
    <AccountID>[my account id was here]</AccountID>
    </Authentication>
    <Order>
    <OrderMode>Test</OrderMode>
    <CardHolder>
    <BillingInformation>
    <BillingFirstName>Arin</BillingFirstName>
    <BillingMI>W</BillingMI>
    <BillingLastName>Sime</BillingLastName>
    <BillingEmail>[email protected]</BillingEmail>
    <BillingPhone>123.456.7890</BillingPhone>
    </BillingInformation>
    <BillingAddress>
    <BillingAddress1>Post Office Box 1000</BillingAddress1>
    <BillingAddress2></BillingAddress2>
    <BillingAddress3></BillingAddress3>
    <BillingCity>Blacksburg</BillingCity>
    <BillingStateProvince>VA</BillingStateProvince>
    <BillingPostalCode>12346-4563</BillingPostalCode>
    <BillingCountryCode>840</BillingCountryCode>
    </BillingAddress>
    <PaymentMethod>
    <PaymentType>CreditCard</PaymentType>
    <CreditCard>
    <NameOnCard>Arin Sime</NameOnCard>
    <CardNumber>4111111111111111</CardNumber>
    <Cvv2>123</Cvv2>
    <ExpirationDate>04/15</ExpirationDate>
    </CreditCard>
    </PaymentMethod>
    </CardHolder>
    <OrderItemList>
    <OrderItem>
    <ItemID>1</ItemID>
    <ItemName>Donation</ItemName>
    <Quantity>1</Quantity>
    <UnitPrice>1000</UnitPrice>
    <UnitDeductible>1000</UnitDeductible>
    </OrderItem>
    </OrderItemList>
    <Receipt>
    <SendReceipt>true</SendReceipt>
    <WID>64906</WID>
    </Receipt>
    <Transaction>
    <TransactionType>Authorize</TransactionType>
    <CurrentTotals>
    <TotalDeductible>1000</TotalDeductible>
    <Total>1000</Total>
    </CurrentTotals>
    </Transaction>
    </Order>
    </Request>
    </Engine>
    </CnPAPI>'}
    puts "XML to post:"
    puts request.body
    response = Net::HTTP.start(url.host, url.port) {|http| http.request(request)}
    puts "Response Received:"
    puts response.inspect
    puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"

  • #2
    Good day!

    I am a bit confused- you say FaaS but you are posting to https://paas.cloud.clickandpledge.com. This URL is for the PaaS platform which is a complete XML processor.

    The FaaS platform is an HTML processor and its URL for posting is https://FaaS.Cloud.ClickandPledge.com

    What is the platform you are using? Based on your code you are posting to the PaaS platform. Please verify.

    I will review your code and will get back to you.
    Regards,
    Click & Pledge Support Department

    On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
    Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

    Comment


    • #3
      Good day!

      We are a bit confused still ..

      SOAP is a web service and should be called like a method. You are posting the XML to the PaaS processor which is a SOAP service.

      We have 2 ways for processing forms:

      - PaaS (Payment-as-a-Service) Platform which is a SOAP service API and it needs to be called as a method
      - FaaS (Forms-as-a-Service) which accepts HTML posts- please check examples at http://clickandpledge.com/Platforms/...ment/API/FaaS/ - check the manual at: http://manual.clickandpledge.com/Form-Field-Names.html

      Naturally you cannot post XML to PaaS platform since that accepts it through methods and not posts.

      I think you want to use FaaS platform with HTML forms and use https://FaaS.Cloud.ClickandPledge.com to post the forms to it - the FaaS processor is a wrapper for PaaS platform and converts all your posts to XML and processes it through the PaaS web services.

      Please tell me if you need further help or clarification. I am sure if you see the examples it will make sense. You appear to know how to spell XML and as such FaaS should be a breeze for you.
      Regards,
      Click & Pledge Support Department

      On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

      Join us @ the educational webinars: https://clickandpledge.com/webinars/
      Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
      Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

      Comment


      • #4
        You're right, I am using PaaS, sorry for the confusion. Any help you can provide is greatly appreciated.

        Comment


        • #5
          Good day!

          This requires programming and calling the method.

          May I ask why you want to use the PaaS services? If you simply have a form it is much easier to use the FaaS processor and post your forms to it.

          We don't know Ruby around here so I am not sure how we can help you with using PaaS using Ruby. As far as Ruby is concerned we just know how to spell it.
          Regards,
          Click & Pledge Support Department

          On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

          Join us @ the educational webinars: https://clickandpledge.com/webinars/
          Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
          Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

          Comment

          Working...
          X