No announcement yet.

Is it realistic to integrate with the PaaS API outside of Salesforce context?

  • Filter
  • Time
  • Show
Clear All
new posts

  • twoods
    Ok, I got it working. Neither the PAAS manual or examples get into the technical details of what the SOAP request needs to looks like, but after taking a closer look at the WSDL I figured it out... for the benefit of others trying to do this, here's an example of an underlying soap request that I got to work (again with the Guid and ID removed).
    <SOAP-ENV:Envelope xmlns:SOAP-ENV=""><SOAP-ENV:Header/><SOAP-ENV:Body><Operation xmlns=""><instruction>&lt;CnPAPI xmlns="urn:APISchema.xsd"&gt;&lt;Version&gt;12&lt;/Version&gt;&lt;Engine&gt;&lt;Request&gt;&lt;Operat ion&gt;&lt;OperationType&gt;Transaction&lt;/OperationType&gt;&lt;IPAddress&gt;;/IPAddress&gt;&lt;/Operation&gt;&lt;Authentication&gt;&lt;AccountGuid &gt;REMOVED FOR SECURITY&lt;/AccountGuid&gt;&lt;AccountID&gt;REMOVED FOR SECURITY &lt;/AccountID&gt;&lt;/Authentication&gt;&lt;Order&gt;&lt;OrderMode&gt;Te st&lt;/OrderMode&gt;&lt;Tracker&gt;12345&lt;/Tracker&gt;&lt;CardHolder&gt;&lt;BillingInformatio n&gt;&lt;BillingFirstName&gt;Fname&lt;/BillingFirstName&gt;&lt;BillingLastName&gt;Lname&l t;/BillingLastName&gt;&lt;BillingEmail&gt;[email protected];/BillingEmail&gt;&lt;BillingPhone&gt;540-000-0000&lt;/BillingPhone&gt;&lt;/BillingInformation&gt;&lt;PaymentMethod&gt;&lt;Pay mentType&gt;CreditCard&lt;/PaymentType&gt;&lt;CreditCard&gt;&lt;NameOnCard&gt ;John Smith&lt;/NameOnCard&gt;&lt;CardNumber&gt;4111111111111111&l t;/CardNumber&gt;&lt;Cvv2&gt;123&lt;/Cvv2&gt;&lt;ExpirationDate&gt;01/15&lt;/ExpirationDate&gt;&lt;/CreditCard&gt;&lt;/PaymentMethod&gt;&lt;/CardHolder&gt;&lt;OrderItemList&gt;&lt;OrderItem&g t;&lt;ItemID&gt;1&lt;/ItemID&gt;&lt;ItemName&gt;test description&lt;/ItemName&gt;&lt;Quantity&gt;1&lt;/Quantity&gt;&lt;UnitPrice&gt;1025&lt;/UnitPrice&gt;&lt;/OrderItem&gt;&lt;/OrderItemList&gt;&lt;Transaction&gt;&lt;Transactio nType&gt;Payment&lt;/TransactionType&gt;&lt;CurrentTotals&gt;&lt;Total& gt;1025&lt;/Total&gt;&lt;/CurrentTotals&gt;&lt;/Transaction&gt;&lt;/Order&gt;&lt;/Request&gt;&lt;/Engine&gt;&lt;/CnPAPI&gt;</instruction></Operation></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Last edited by twoods; 12-21-2014, 10:28 PM.

    Leave a comment:

  • twoods
    Thanks for the reply!

    If we get everything else working I will follow up about supporting refunds and we can wait on that as long as it is coming. We've found that for anything but very small events it is always necessary to be able to issue a few refunds for various reasons.

    The XML that is failing (below) with the real service works in the sandbox (i.e. the part inside the SOAP envelope with the real AccountGuid and AccountID which I have removed in this post).

    The message that comes back in the response from the real service is:Error in deserializing body of request message for operation 'Operation'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'Operation' and namespace ''. Found node type 'Element' with name 'CnPAPI' and namespace 'urn:APISchema.xsd'

    <SOAP-ENV:Envelope xmlns:SOAP-ENV=""><SOAP-ENV:Header/><SOAP-ENV:Body><CnPAPI xmlns="urn:APISchema.xsd"><Version>12</Version><Engine><Request><Operation><OperationType >Transaction</OperationType><IPAddress></IPAddress></Operation><Authentication><AccountGuid>REMOVED FOR SECURITY</AccountGuid><AccountID>REMOVED FOR SECURITY</AccountID></Authentication><Order><OrderMode>Test</OrderMode><Tracker>12345</Tracker><CardHolder><BillingInformation><BillingFi rstName>Fname</BillingFirstName><BillingLastName>Lname</BillingLastName><BillingEmail>[email protected] com</BillingEmail><BillingPhone>540-000-0000</BillingPhone></BillingInformation><PaymentMethod><PaymentType>Cre ditCard</PaymentType><CreditCard><NameOnCard>John Smith</NameOnCard><CardNumber>4111111111111111</CardNumber><Cvv2>123</Cvv2><ExpirationDate>01/15</ExpirationDate></CreditCard></PaymentMethod></CardHolder><OrderItemList><OrderItem><ItemID>1</ItemID><ItemName>test description</ItemName><Quantity>1</Quantity><UnitPrice>1025</UnitPrice></OrderItem></OrderItemList><Transaction><TransactionType>Paymen t</TransactionType><CurrentTotals><Total>1025</Total></CurrentTotals></Transaction></Order></Request></Engine></CnPAPI></SOAP-ENV:Body></SOAP-ENV:Envelope>

    Last edited by twoods; 12-21-2014, 10:29 PM.

    Leave a comment:

  • CnP.Support
    Good day Tad,

    As for refunds- the API supports refunds but we have not exposed it to the public as it is to be released next year with release of Salesforce 9.x. A lot needs to be coordinated first before we add it to the manual.

    To test the sandbox you may use the following: (which is iframed in the manual page).

    You stated that you have a failed XML. If you post the XML here we can review and find out what is wrong with your sample. Are you using one of our samples?

    Leave a comment:

  • Is it realistic to integrate with the PaaS API outside of Salesforce context?

    At the request of two of our mutual customers, I am investigating integrating ClickAndPledge as a payment gateway option into the 3rd party service, currently supports PayPal and

    I have attempted to post some test PaaS API requests, but before I get too deep, is the PaaS API documentation ( accurate and up-to-date for the production payment service? XML that is successfully parsing in the Sandbox ( is failing with errors that seem to imply the sandbox may be out-of-sync with XML that the real payment service expects.

    My other question is whether or not the API supports issuing refunds. I know that ClickAndPledge's GUI only supports full (and not partial) refunds, which is okay, however I don't see anything in the API documentation regarding refunding a transaction. Searching this forum, I see previous Q&A implying that refunds through the PaaS API were not supported in the past but maybe they are by now or will be?