Announcement

Collapse
No announcement yet.

PaaS International Payments

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

  • PaaS International Payments

    Hello,

    We are working with the PaaS API for a client that uses your system. U.S. transactions go through without a problem, but we were getting a 2052 error for international addresses.


    After digging deeper, it appears that it has to do with the BillingStateProvince . This field is required even when a country outside of U.S./Canada is selected. What value should we use for this in other countries?


    I think we were able to work around it by sending a value of " " (two spaces) with these transactions....but is this the correct thing to do? The sample forms that you provided don't account for this. Any help would be appreciated. Thanks!

  • #2
    Good day!

    BillingStateProvince is not a REQUIRED field. In the absence of the State what exact text were you passing?

    Please make sure the text you are passing does not have any of the reserved words such as SELECT, etc.
    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
      That is what I had originally thought. Below is a testing transaction that would return the xml error. It doesn't return the xml error when in demo mode in this case.

      Code:
      <CnPAPI xmlns="urn:APISchema.xsd">
        <Version>12</Version> 
        <Engine>
          <Request>
            <Operation>
              <OperationType>Transaction</OperationType>
              <IPAddress>69.146.72.74</IPAddress>
            </Operation>
      
      
            <Authentication>
              <AccountGuid>0f343b01-ca79-4dbe-9f82-01ac47d2af53</AccountGuid>
              <AccountID>19466</AccountID>
            </Authentication>
            <Order>
              <OrderMode>Test</OrderMode>
              <CardHolder>
      
      
                <BillingInformation>
                  <BillingFirstName>Simon</BillingFirstName>
                  <BillingLastName>Sørensen</BillingLastName>
                  <BillingEmail>[email protected]</BillingEmail>
                  <BillingPhone>406-671-3333</BillingPhone>
                </BillingInformation>
                <BillingAddress>
      
      
                  <BillingAddress1>Vinkelager 42, 2. tv.</BillingAddress1>
                  <BillingAddress2></BillingAddress2>
                  <BillingAddress3></BillingAddress3>
                  <BillingCity>Vanløse</BillingCity>
                  <BillingPostalCode>2720</BillingPostalCode>
                  <BillingCountryCode>208</BillingCountryCode>
      
      
                </BillingAddress>
                <CustomFieldList>
                  <CustomField>
                    <FieldName>How do you wish to be listed?</FieldName>
                    <FieldValue>FieldValue2</FieldValue>
                  </CustomField>
                  <CustomField>
                    <FieldName>How did you hear about Panthera?</FieldName>
      
      
                    <FieldValue>Web Search</FieldValue>
                  </CustomField>
                  <CustomField>
                    <FieldName>Please Specify</FieldName>
                    <FieldValue>FieldValue4</FieldValue>
                  </CustomField>
                  <CustomField>
      
      
                    <FieldName>Check here if you wish to remain anonymous</FieldName>
                    <FieldValue>Checked</FieldValue>
                  </CustomField>
                  <CustomField>
                    <FieldName>Gift Notification - Name</FieldName>
                    <FieldValue></FieldValue>
                  </CustomField>
      
      
                  <CustomField>
                    <FieldName>Gift Notification - E-Mail</FieldName>
                    <FieldValue></FieldValue>
                  </CustomField>
                  <CustomField>
                    <FieldName>Gift Notification - Message</FieldName>
                    <FieldValue></FieldValue>
                  </CustomField>
      
      
                </CustomFieldList>
                <PaymentMethod>
                  <PaymentType>CreditCard</PaymentType>
                  <CreditCard>
                    <NameOnCard>Chris S Roane</NameOnCard>
                    <CardNumber>4111111111111111</CardNumber>
                    <Cvv2>123</Cvv2>
      
      
                    <ExpirationDate>01/12</ExpirationDate>
                  </CreditCard>
                </PaymentMethod>
              </CardHolder>
              <OrderItemList>
                <OrderItem>
                  <ItemID>1</ItemID>
                  <ItemName>Donation Package: Outfit a Ranger</ItemName>
      
      
                  <Quantity>1</Quantity>
                  <UnitPrice>6000</UnitPrice>
                  <UnitDeductible>6000</UnitDeductible>
                </OrderItem>
              </OrderItemList>
              <Receipt>
      		 			<SendReceipt>true</SendReceipt>
      
      
      		 			<WID>47311</WID>  
                <Deductible>1</Deductible>
                <EmailNotificationList><NotificationEmail>[email protected]</NotificationEmail><NotificationEmail>[email protected]</NotificationEmail><NotificationEmail>[email protected]</NotificationEmail><NotificationEmail>[email protected]</NotificationEmail><NotificationEmail>[email protected]</NotificationEmail><NotificationEmail>[email protected]</NotificationEmail><NotificationEmail>[email protected]</NotificationEmail></EmailNotificationList>
              </Receipt>
              <Transaction>
      
      
                <TransactionType>Payment</TransactionType>
                <CurrentTotals>
                  <TotalDeductible>6000</TotalDeductible>
                  <Total>6000</Total>
                </CurrentTotals>
              </Transaction>
            </Order>
      
      
          </Request>
        </Engine>
      </CnPAPI>

      Comment


      • #4
        I am reviewing your code to find out what the issue is. The ERROR states there is an XML formatting error. Are you aware of the following site?

        https://verify.paas.cloud.clickandpl...m/default.aspx

        It allows you to post the XML and make sure the response is OK. It is a quick way to verify XML during development.

        I will keep you posted.
        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


        • #5
          Yes, I found that site yesterday and that is how I discovered that if I included the state entry, that error would go away.

          Comment


          • #6
            I reviewed your XML and realized what is going on.

            Billing State / Province is a mandatory field. For US the State should be posted and for other countries the Province.

            We are going to make an update the schema and remove the mandatory requirement for this field. This update will help with your case. For now please pass a blank or NA as the field value.
            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


            • #7
              Thanks for the response.

              However, this didn't seem to fix the issue we are having with international orders. We are still getting the very vague 2052 error...but U.S. orders are going through fine. I have a few questions on this:


              1. We do not have the php soap extension on the server, so we are using the nusoap library. For each xml value, we pass it through the following:

              Code:
              htmlspecialchars(strip_tags($value), ENT_XML1, 'UTF-8')
              Should we be doing something else to handle international addresses? I'm pretty sure it has to do with the address information causing the issue.


              2. Is there anyway we can test international transactions from test mode? From my testing, it doesn't look like it pays any attention to the address fields.


              We are implementing improved logging on our end to see the exact xml that is being sent for the international orders that are causing the 2052....but I was hoping I could get it fixed before another one fails. Any help would be appreciated! Thanks.

              Comment


              • #8
                Good day!

                We are working on a change in the Schema to allow for a NULL BillingStateProvince node. Currently the minimum requirement is 2 characters so if you pass NA it should work.

                I will update you when we have an update - it should be later today or tomorrow and hopefully this will help 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


                • #9
                  I think the problem we were having was that we weren't requiring the phone number field on the form. I'll see if we have any other issues with international orders and let you know what we figure out (in hopes of helping anyone else with this problem).

                  Comment


                  • #10
                    The phone # is not mandatory but if you pass it the length has to be between 6-50 characters. So if it is NULL it is OK but if you pass it then the length has to be within a set format.

                    What is the phone # you are passing?
                    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


                    • #11
                      We had been passing the value with the xml, even if they did not enter a phone number. Below is the result we received from the test transaction. We solved the issue by requiring the phone number on the form.

                      I receive the below information when the 2052 error comes up. So if we have any other issues that don't make sense, I'll let you know. But I think we are fine for now.

                      Code:
                      Array(
                          [OperationResult] => Array
                              (
                                  [AdditionalInfo] => The 'urn:APISchema.xsd:BillingPhone' element is invalid - The value '' is invalid according to its datatype 'String' - The actual length is less than the MinLength value.
                                  [AuthorizationCode] => 
                                  [EchoInput] => <?xml version="1.0" encoding="utf-8"?><CnPAPI xmlns="urn:APISchema.xsd">
                        <Version>12</Version> 
                        <Engine>
                          <Request>
                            <Operation>
                              <OperationType>Transaction</OperationType>
                              <IPAddress>74.95.80.113</IPAddress>
                            </Operation>
                            <Authentication>
                              <AccountGuid>0f343b01-ca79-4dbe-9f82-01ac47d2af53</AccountGuid>
                              <AccountID>19466</AccountID>
                            </Authentication>
                            <Order>
                              <OrderMode>Test</OrderMode>
                              <CardHolder>
                                <BillingInformation>
                                  <BillingFirstName>Dan</BillingFirstName>
                                  <BillingLastName>Knisley</BillingLastName>
                                  <BillingEmail>[email protected]</BillingEmail>
                                  <BillingPhone></BillingPhone>
                                </BillingInformation>
                                <BillingAddress>
                                  <BillingAddress1>109 S Gordon St</BillingAddress1>
                                  <BillingAddress2></BillingAddress2>
                                  <BillingAddress3></BillingAddress3>
                                  <BillingCity>Alexandria</BillingCity>
                                  <BillingStateProvince>Virginia</BillingStateProvince>
                                  <BillingPostalCode>22304</BillingPostalCode>
                                  <BillingCountryCode>840</BillingCountryCode>
                                </BillingAddress>
                                <CustomFieldList><CustomField><FieldName>Allocation</FieldName><FieldValue>Tigers</FieldValue></CustomField><CustomField><FieldName>How do you wish to be listed?</FieldName><FieldValue></FieldValue></CustomField><CustomField><FieldName>How did you hear about Panthera?</FieldName><FieldValue>Web Search</FieldValue></CustomField><CustomField><FieldName>Please Specify</FieldName><FieldValue></FieldValue></CustomField><CustomField><FieldName>Check here if you wish to remain anonymous</FieldName><FieldValue></FieldValue></CustomField><CustomField><FieldName>Tribute Type</FieldName><FieldValue>In honor of</FieldValue></CustomField><CustomField><FieldName>Honoree Name</FieldName><FieldValue>Dan</FieldValue></CustomField><CustomField><FieldName>Tribute - Email</FieldName><FieldValue>[email protected]</FieldValue></CustomField><CustomField><FieldName>Tribute - Message</FieldName><FieldValue>Hello </FieldValue></CustomField></CustomFieldList>
                                <PaymentMethod>
                                  <PaymentType>CreditCard</PaymentType>
                                  <CreditCard>
                                    <NameOnCard>Dan Knisley</NameOnCard>
                                    <CardNumber>4111111111111111</CardNumber>
                                    <Cvv2>1234</Cvv2>
                                    <ExpirationDate>01/12</ExpirationDate>
                                  </CreditCard>
                                </PaymentMethod>
                              </CardHolder>
                              <OrderItemList>
                                <OrderItem>
                                  <ItemID>1</ItemID>
                                  <ItemName>Donation</ItemName>
                                  <Quantity>1</Quantity>
                                  <UnitPrice>80000</UnitPrice>
                                  <UnitDeductible>80000</UnitDeductible>
                                </OrderItem>
                              </OrderItemList>
                              <Receipt>
                      		 			<SendReceipt>true</SendReceipt>
                      		 			<WID>47311</WID>  
                                <Deductible>1</Deductible>
                                <EmailNotificationList><NotificationEmail>[email protected]</NotificationEmail></EmailNotificationList>
                              </Receipt>
                              <Transaction>
                                <TransactionType>Payment</TransactionType>
                                
                                <CurrentTotals>
                                  <TotalDeductible>80000</TotalDeductible>
                                  <Total>80000</Total>
                                </CurrentTotals>
                              </Transaction>
                            </Order>
                          </Request>
                        </Engine>
                      </CnPAPI>
                                  [FraudReview] => 
                                  [GatewayTransactionNumber] => 
                                  [ResultCode] => 2052
                                  [ResultData] => Xml Error
                                  [Server] => PaaS-2
                                  [TransactionNumber] => 
                                  [VaultGUID] => 
                                  [Version] => PaaS.2.20111207.002.040.002.000.034
                              )
                      
                      
                      )

                      Comment


                      • #12
                        Okay, I confirmed that we worked through what appears to be all of the issues with the PaaS. The latest issues we resolved had to do with the custom fields limiting values to 500 characters.

                        Anyone implementing the PaaS api should implement a logging mechanism to record errors. This will make the debugging process 10x easier to get through, because you can see exactly where the problem is.

                        Thanks for the quick responses to this topic. I appreciate it!

                        Comment


                        • #13
                          Good day!

                          Glad to see all is working. We just released an update to the PaaS platform (# PaaS.x.20111222.002.041.000.000.035) where all aspects of the address and billing information are optional. If any field in the address is missing the system will not return an error.

                          The release notes will be posted shortly but the release is currently live (as of 5 minutes ago!)
                          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