FlatRateShippingOptions not recognized when specifying CallbackURL for Paypal SetExpressCheckout - soap

I'm using the PayPal Express Checkout SOAP API. I have a SetExpressCheckoutRequest that works until I add the CallbackURL element. It then gives me the following error:
Ack: Failure
ShortMessage: Flat-rate shipping options are missing.
LongMessage: Flat-rate shipping options are missing; you must specify flat-rate shipping options when you specify a callback URL.
ErrorCode: 11825
My request includes the following elements (child elements of <ebl:PaymentDetails>):
<ebl:FlatRateShippingOptions>
<ebl:ShippingOptionIsDefault>true</ebl:ShippingOptionIsDefault>
<ebl:ShippingOptionAmount currencyID=""USD"">4.00</ebl:ShippingOptionAmount>
<ebl:ShippingOptionName>Ground</ebl:ShippingOptionName>
</ebl:FlatRateShippingOptions>
The various SDKs for Soap don't seem to include these elements. After a great deal of searching, I have not been able to find an example of a working SetExpressCheckoutRequest that includes this option. I have tried many variations but nothing seems to work.
Does anyone have a sample SOAP API request that works with this option?
Thanks,
CJ
Here is the complete XML request file. It works without the CallbackURL line and the FlatRateShippingOptions section. I've tried it with and without the ShippingOptions element since the documentation seems inconsistent as to whether or not it is required.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:ebay:api:PayPalAPI" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ed="urn:ebay:apis:EnhancedDataTypes">
<soapenv:Header>
<ns:RequesterCredentials>
<ebl:Credentials>
<ebl:Username>sdk-three_api1.sdk.com</ebl:Username>
<ebl:Password>QFZCWN5HZM8VBG7Q</ebl:Password>
<ebl:Signature>A-IzJhZZjhg29XQ2qnhapuwxIDzyAZQ92FRP5dqBzVesOkzbdUONzmOU</ebl:Signature>
</ebl:Credentials>
</ns:RequesterCredentials>
</soapenv:Header>
<soapenv:Body>
<ns:SetExpressCheckoutReq>
<ns:SetExpressCheckoutRequest>
<ebl:Version>106.0</ebl:Version>
<ebl:SetExpressCheckoutRequestDetails>
<ebl:MaxAmount currencyID="USD">20.00</ebl:MaxAmount>
<ebl:ReturnURL>https://www.domain.com/final.asp</ebl:ReturnURL>
<ebl:CancelURL>https://www.domain.com/reviewcart.asp</ebl:CancelURL>
<ebl:NoShipping>2</ebl:NoShipping>
<ebl:AddressOverride>1</ebl:AddressOverride>
<ebl:LocaleCode>US</ebl:LocaleCode>
<ebl:SolutionType>Sole</ebl:SolutionType>
<ebl:BuyerEmail>platfo_1255077030_biz#gmail.com</ebl:BuyerEmail>
<ebl:CallbackURL>https://www.domain.com/paypalcallback.asp</ebl:CallbackURL>
<ebl:PaymentDetails>
<ebl:FlatRateShippingOptions>
<ebl:ShippingOptions>
<ebl:ShippingOptionIsDefault>true</ebl:ShippingOptionIsDefault>
<ebl:ShippingOptionAmount currencyID="USD">4.00</ebl:ShippingOptionAmount>
<ebl:ShippingOptionName>Ground</ebl:ShippingOptionName>
</ebl:ShippingOptions>
<ebl:ShippingOptions>
<ebl:ShippingOptionIsDefault>false</ebl:ShippingOptionIsDefault>
<ebl:ShippingOptionAmount currencyID="USD">20.00</ebl:ShippingOptionAmount>
<ebl:ShippingOptionName>NextDayAir</ebl:ShippingOptionName>
</ebl:ShippingOptions>
</ebl:FlatRateShippingOptions>
<ebl:OrderTotal currencyID="USD">20.00</ebl:OrderTotal>
<ebl:ItemTotal currencyID="USD">16.00</ebl:ItemTotal>
<ebl:ShippingTotal currencyID="USD">4.00</ebl:ShippingTotal>
<ebl:HandlingTotal currencyID="USD">0.00</ebl:HandlingTotal>
<ebl:TaxTotal currencyID="USD">0.00</ebl:TaxTotal>
<ebl:OrderDescription>Cart ID 123456</ebl:OrderDescription>
<ebl:ShipToAddress>
<ebl:Name>John Doe</ebl:Name>
<ebl:Street1>123 Main St</ebl:Street1>
<ebl:Street2>Apt 2</ebl:Street2>
<ebl:CityName>Chicago</ebl:CityName>
<ebl:StateOrProvince>IL</ebl:StateOrProvince>
<ebl:Country>US</ebl:Country>
<ebl:Phone>312-555-1234</ebl:Phone>
<ebl:PostalCode>60610</ebl:PostalCode>
</ebl:ShipToAddress>
<ebl:PaymentDetailsItem>
<ebl:Name>3001</ebl:Name>
<ebl:Quantity>2</ebl:Quantity>
<ebl:Tax currencyID="USD">0.00</ebl:Tax>
<ebl:Amount currencyID="USD">6.00</ebl:Amount>
<ebl:Description>test order</ebl:Description>
<ebl:ItemCategory>Physical</ebl:ItemCategory>
</ebl:PaymentDetailsItem>
<ebl:PaymentDetailsItem>
<ebl:Name>3002</ebl:Name>
<ebl:Quantity>4</ebl:Quantity>
<ebl:Tax currencyID="USD">0.00</ebl:Tax>
<ebl:Amount currencyID="USD">1.00</ebl:Amount>
<ebl:Description>test order</ebl:Description>
<ebl:ItemCategory>Physical</ebl:ItemCategory>
</ebl:PaymentDetailsItem>
<ebl:PaymentAction>Sale</ebl:PaymentAction>
</ebl:PaymentDetails>
<ebl:ChannelType>Merchant</ebl:ChannelType>
<ebl:CustomerServiceNumber>3125559876</ebl:CustomerServiceNumber>
<ebl:BuyerEmailOptinEnable>1</ebl:BuyerEmailOptinEnable>
<ebl:TotalType>EstimatedTotal</ebl:TotalType>
<ebl:NoteToBuyer>Sample note to buyer.</ebl:NoteToBuyer>
<ebl:PaymentReason>None</ebl:PaymentReason>
<ebl:BuyerEmailOptinEnable xmlns="">1</ebl:BuyerEmailOptinEnable>
</ebl:SetExpressCheckoutRequestDetails>
</ns:SetExpressCheckoutRequest>
</ns:SetExpressCheckoutReq>
</soapenv:Body>
</soapenv:Envelope>
I finally got it to work. I had to move the FlatRateShippingOptions section below the PaymentDetails section. Here is the complete working XML request:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:ebay:api:PayPalAPI" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:ed="urn:ebay:apis:EnhancedDataTypes">
<soapenv:Header>
<ns:RequesterCredentials>
<ebl:Credentials>
<ebl:Username>sdk-three_api1.sdk.com</ebl:Username>
<ebl:Password>QFZCWN5HZM8VBG7Q</ebl:Password>
<ebl:Signature>A-IzJhZZjhg29XQ2qnhapuwxIDzyAZQ92FRP5dqBzVesOkzbdUONzmOU</ebl:Signature>
</ebl:Credentials>
</ns:RequesterCredentials>
</soapenv:Header>
<soapenv:Body>
<ns:SetExpressCheckoutReq>
<ns:SetExpressCheckoutRequest>
<ebl:Version>106.0</ebl:Version>
<ebl:SetExpressCheckoutRequestDetails>
<ebl:MaxAmount currencyID="USD">20.00</ebl:MaxAmount>
<ebl:ReturnURL>https://www.domain.com/final.asp</ebl:ReturnURL>
<ebl:CancelURL>https://www.domain.com/reviewcart.asp</ebl:CancelURL>
<ebl:NoShipping>2</ebl:NoShipping>
<ebl:AddressOverride>1</ebl:AddressOverride>
<ebl:LocaleCode>US</ebl:LocaleCode>
<ebl:SolutionType>Sole</ebl:SolutionType>
<ebl:BuyerEmail>platfo_1255077030_biz#gmail.com</ebl:BuyerEmail>
<ebl:CallbackURL>https://www.domain.com/paypalcallback.asp</ebl:CallbackURL>
<ebl:PaymentDetails>
<ebl:OrderTotal currencyID="USD">20.00</ebl:OrderTotal>
<ebl:ItemTotal currencyID="USD">16.00</ebl:ItemTotal>
<ebl:ShippingTotal currencyID="USD">4.00</ebl:ShippingTotal>
<ebl:HandlingTotal currencyID="USD">0.00</ebl:HandlingTotal>
<ebl:TaxTotal currencyID="USD">0.00</ebl:TaxTotal>
<ebl:OrderDescription>Cart ID 123456</ebl:OrderDescription>
<ebl:ShipToAddress>
<ebl:Name>John Doe</ebl:Name>
<ebl:Street1>123 Main St</ebl:Street1>
<ebl:Street2>Apt 2</ebl:Street2>
<ebl:CityName>Chicago</ebl:CityName>
<ebl:StateOrProvince>IL</ebl:StateOrProvince>
<ebl:Country>US</ebl:Country>
<ebl:Phone>312-555-1234</ebl:Phone>
<ebl:PostalCode>60610</ebl:PostalCode>
</ebl:ShipToAddress>
<ebl:PaymentDetailsItem>
<ebl:Name>3001</ebl:Name>
<ebl:Quantity>2</ebl:Quantity>
<ebl:Tax currencyID="USD">0.00</ebl:Tax>
<ebl:Amount currencyID="USD">6.00</ebl:Amount>
<ebl:Description>test order</ebl:Description>
<ebl:ItemCategory>Physical</ebl:ItemCategory>
</ebl:PaymentDetailsItem>
<ebl:PaymentDetailsItem>
<ebl:Name>3002</ebl:Name>
<ebl:Quantity>4</ebl:Quantity>
<ebl:Tax currencyID="USD">0.00</ebl:Tax>
<ebl:Amount currencyID="USD">1.00</ebl:Amount>
<ebl:Description>test order</ebl:Description>
<ebl:ItemCategory>Physical</ebl:ItemCategory>
</ebl:PaymentDetailsItem>
<ebl:PaymentAction>Sale</ebl:PaymentAction>
</ebl:PaymentDetails>
<ebl:FlatRateShippingOptions>
<ebl:ShippingOptionIsDefault>true</ebl:ShippingOptionIsDefault>
<ebl:ShippingOptionAmount currencyID="USD">4.00</ebl:ShippingOptionAmount>
<ebl:ShippingOptionName>Ground</ebl:ShippingOptionName>
</ebl:FlatRateShippingOptions>
<ebl:FlatRateShippingOptions>
<ebl:ShippingOptionIsDefault>false</ebl:ShippingOptionIsDefault>
<ebl:ShippingOptionAmount currencyID="USD">20.00</ebl:ShippingOptionAmount>
<ebl:ShippingOptionName>NextDayAir</ebl:ShippingOptionName>
</ebl:FlatRateShippingOptions>
<ebl:CallbackTimeout>6</ebl:CallbackTimeout>
<ebl:ChannelType>Merchant</ebl:ChannelType>
<ebl:CustomerServiceNumber>3125559876</ebl:CustomerServiceNumber>
<ebl:BuyerEmailOptinEnable>1</ebl:BuyerEmailOptinEnable>
<ebl:TotalType>EstimatedTotal</ebl:TotalType>
<ebl:NoteToBuyer>Sample note to buyer.</ebl:NoteToBuyer>
<ebl:PaymentReason>None</ebl:PaymentReason>
<ebl:BuyerEmailOptinEnable xmlns="">1</ebl:BuyerEmailOptinEnable>
</ebl:SetExpressCheckoutRequestDetails>
</ns:SetExpressCheckoutRequest>
</ns:SetExpressCheckoutReq>
</soapenv:Body>
</soapenv:Envelope>
Thanks for your help in resolving this!

Here's a working sample of SetExpressCheckout with callback included, but it's using NVP instead of SOAP.
If you want to post a sample of your entire XML request I'll see if I can reproduce the issue and figure out the problem.
I think your problem is that you've got the FlatRateShippingOptions as a child element within PaymentDetails. Looking at the PayPal SOAP documentation for SEC, it looks like FlatRateShippingOptions should be above that, on the same level as CallbackURL.
Try moving it out of PaymentDetails and see if that helps.

Related

QBXML Receive payment applied to multiple Invoices

I'm trying to apply 1 payment to multiple invoices with QBXML and I'm getting the following error
QuickBooks found an error when parsing the provided XML text stream
My XML:
<?xml version="1.0" encoding="utf-8"?><?qbxml version="13.0"?>
<QBXML>
<QBXMLMsgsRq onError="continueOnError">
<ReceivePaymentAddRq>
<ReceivePaymentAdd>
<CustomerRef>
<ListID>8000254C-1444676392</ListID>
</CustomerRef>
<TxnDate>2018-12-13</TxnDate>
<RefNumber>457</RefNumber>
<TotalAmount>863.10</TotalAmount>
<Memo></Memo>
<PaymentMethodRef><FullName/></PaymentMethodRef>
<AppliedToTxnAdd>
<TxnID>11B0C6-1544760951</TxnID>
<PaymentAmount>179.00</PaymentAmount>
</AppliedToTxnAdd>
<AppliedToTxnAdd>
<TxnID>11B0CA-1544761043</TxnID>
<PaymentAmount>684.10</PaymentAmount>
</AppliedToTxnAdd>
</ReceivePaymentAdd><IncludeRetElement>TxnID</IncludeRetElement><IncludeRetElement>RefNumber</IncludeRetElement></ReceivePaymentAddRq></QBXMLMsgsRq></QBXML>
Notice I have 2 AppliedToTxnAdd elements.
However if I only apply 1 AppliedToTxnAdd, it works!
The issue was the order of the xml elements. QB cares about that.

LogRhythm SOAP Api problems

Anyone here manage to get something from LR soap API ?
My query is quite simple, here is an extract:
<soap:Body>
<GetAlarmHistoryByID
xmlns="http://www.logrhythm.com/webservices"
xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/">
<alarmID>140</alarmID>
<includeNotifications>false</includeNotifications>
<includeComments>false</includeComments>
</GetAlarmHistoryByID>
</soap:Body>
I receive the following in response, which makes no sense, because of "Include notifcations or include comments is required." but the values are found lower:
includeNotifications: 140 include comments: False (inversed from the values i passed...)
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring xml:lang="en-US">Include notifcations or include comments is required.</faultstring>
<detail>
<LogRhythmWebServiceFault
xmlns="http://www.logrhythm.com/webservices"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<FaultID>4d12a9ed-bff7-4dfb-ad71-29372c12544d</FaultID>
<Details>Error getting Alarm history (includeNotifications: 140 include comments: False) for ID False</Details>
<FaultTime>2017-09-07T17:46:22.5779477Z</FaultTime>
<ErrorID>3024</ErrorID>
</LogRhythmWebServiceFault>
</detail>
</s:Fault>
Method: GetAlarmHistoryByID
Retrieve a list of alarm status and comment updates. The Alarm ID would be derived from one of the GetFirstPageAlarms or a GetNextPageAlarms method call.
alarmID long No The unique ID of the alarm.
includeNotifications boolean No If true, include notification history.
includeComments boolean No If true, include comments history.
Output
The alarm history.
I had a similar problem and it ended up being a bug with the calls on LogRhythm's side. I'd advise to make a ticket with them for a resolution. If you haven't figured it out yet

Ebay API with Paypal IPN integration - Error 20822 - Invalid ItemID or TransactionID

I'm trying to make IPN to set my item as shipped, but i get 20822 error. This is my XMLRequest:
<?xml version="1.0" encoding="utf-8" ?>
<CompleteSaleRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<Version>869</Version>
<ItemID> $item_number </ItemID>
<TransactionID>$txn_id</TransactionID>
<FeedbackInfo>
<CommentText>Great transaction, great buyer!</CommentText>
<CommentType>Positive</CommentType>
<TargetUser>$auction_buyer_id</TargetUser>
</FeedbackInfo>
<Shipped>true</Shipped>
<Paid>true</Paid>
<RequesterCredentials>
<eBayAuthToken> $my_token </eBayAuthToken>
</RequesterCredentials>
</CompleteSaleRequest>
$auction_buyer_id, $item_number and $txn_id are from ipn, and i checked them and i think they are good.
the response from ebay look like this:
<?xml version="1.0" encoding="UTF-8"?>
<CompleteSaleResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2014-05-29T10:41:35.147Z</Timestamp>
<Ack>Failure</Ack>
<Errors>
<ShortMessage>Invalid ItemID or TransactionID</ShortMessage>
<LongMessage>Invalid ItemID or TransactionID</LongMessage>
<ErrorCode>20822</ErrorCode>
<SeverityCode>Error</SeverityCode>
<ErrorClassification>RequestError</ErrorClassification>
</Errors>
<Version>873</Version>
<Build>E873_CORE_APIXO_16844666_R1</Build>
</CompleteSaleResponse>
I was search on internet and i cant find solution. Please help.
Thanks.
I found answer to my question
<TransactionID> should not be $txn_id (like it was in tutorials) but $ebay_txn_id
(i found this variable when i send all variables posted from ipn to my email end search what was there)

What is an InstallationID in Quickbooks QBMSXML

I have a qbmsxml that I'm sending that continues to get a response error 2000.
<qbmsxml>
<signonmsgsrq>
<signondesktoprq>
<clientdatetime>2014-04-03T09:37:23</clientdatetime>
<applicationlogin>my.application.login.id</applicationlogin>
<connectionticket>SDK-MY-Connection-Ticket</connectionticket>
<language>English</language>
<appid>9999999999</appid>
<appver>1.0</appver>
</signondesktoprq>
</signonmsgsrq>
<qbmsxmlmsgsrq>
<customercreditcardauthrq>
<transrequestid>140403937231</transrequestid>
<creditcardnumber>4111111111111111</creditcardnumber>
<expirationmonth>12</expirationmonth>
<expirationyear>2017</expirationyear>
<isecommerce>true</isecommerce>
<amount>0.01</amount>
<nameoncard>John Doe</nameoncard>
<creditcardaddress>1234 Main Street</creditcardaddress>
<creditcardpostalcode>12345</creditcardpostalcode>
</customercreditcardauthrq>
</qbmsxmlmsgsrq>
</qbmsxml>
As I've been reviewing the information on creating a request, I found an 'InstallationID' tag referenced. It goes in the element like so:
<signonmsgsrq>
<signondesktoprq>
<clientdatetime>2014-04-03T09:37:23</clientdatetime>
<applicationlogin>my.application.login.id</applicationlogin>
<connectionticket>SDK-MY-Connection-Ticket</connectionticket>
<installationid>IDTYPE</installationid>
<language>English</language>
<appid>9999999999</appid>
<appver>1.0</appver>
</signondesktoprq>
</signonmsgsrq>
My question is: What is the IDTYPE for InstallationID? Where can I get it? What options can I set it to?
I think the problem is not related to your InstallationID field at all. I think the problem is that your XML isn't conforming to what Intuit expects.
Specifically, everything in your XML request is lowercase, when Intuit expects it to be camel case. You're also missing a qbmsxml version header, and a xml version header.
Here's an example of a correctly formed request:
<?xml version="1.0" encoding="utf-8"?>
<?qbmsxml version="3.0"?>
<QBMSXML>
<SignonMsgsRq>
<SignonTicketRq>
<ClientDateTime>2009-10-09T13:14:16</ClientDateTime>
<SessionTicket>xxxxxxxxxxxxky4yL6eBtCULX1zgQ:106892184</SessionTicket>
</SignonTicketRq>
</SignonMsgsRq>
<QBMSXMLMsgsRq>
<CustomerCreditCardChargeRq>
<TransRequestID>35f9cf7cb20994e8a32e6b3e91e8e602</TransRequestID>
<CreditCardNumber>xxxxxxxxxxxx5100</CreditCardNumber>
<ExpirationMonth>10</ExpirationMonth>
<ExpirationYear>2009</ExpirationYear>
<Amount>295.00</Amount>
<NameOnCard>Keith Palmer</NameOnCard>
<CreditCardAddress>56 Cowles Road</CreditCardAddress>
<CreditCardPostalCode>06279</CreditCardPostalCode>
</CustomerCreditCardChargeRq>
</QBMSXMLMsgsRq>
</QBMSXML>
Where are you getting your syntax from? It seems very wrong... here are some good examples:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration

What is the name of form field where XML belongs to when sending an HTTP POST request to post a job using LinkedIn API

I am looking into the following page to post a job to LinkedIn using their API:
http://developer.linkedin.com/documents/posting-job
I am given a sample XML message (as shown below) and a URL to direct HTTP POST request to. However, one thing is not clear to me which HTML form field I will insert XML content to? In other words, what is the name of this FORM field?
URL to direct HTTP POST request to: http://api.linkedin.com/v1/jobs
Sample XML:
<?xml version="1.0" encoding="UTF-8"?>
<job>
<partner-job-id>LIJ-13239292</partner-job-id>
<contract-id>1234</contract-id>
<customer-job-code>DE247X</customer-job-code>
<company>
<id>1234</id>
<name>Company ABC</name>
<description>A great company</description>
</company>
<position>
<title>Chief Architect</title>
<description>This is a great job.</description>
<skills-and-experience>Programming, financial analysis, and thought leadership.</skills-and-experience>
<location>
<country>
<code>us</code>
</country>
<postal-code>10012</postal-code>
<name>Midtown Manhattan</name>
</location>
<job-functions>
<job-function>
<code>acct</code>
</job-function>
<job-function>
<code>dsgn</code>
</job-functions>
</job-functions>
<industries>
<industry>
<code>38</code>
</industry>
<industry>
<code>44</code>
</industry>
</industries>
<job-type>
<code>C</code>
</job-type>
<experience-level>
<code>4</code>
</experience-level>
</position>
<salary>$100,000-120,000 per year</salary>
<referral-bonus>$5,000 for employees</referral-bonus>
<poster>
<display>true</display>
<role>
<code>R</code>
</role>
<email-address>user#contract.com</email-address>
</poster>
<how-to-apply>
<application-url>http://www.linkedin.com</application-url>
</how-to-apply>
<tracking-pixel-url>http://www.linkedin.com/track.gif</tracking-pixel-url>
</job>