Announcement

Collapse
No announcement yet.

Director

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

  • CnP.Support
    replied
    XML Post

    Hi;

    The problem is with your code. The challenge we have is we don't have PHP programmers in our team. We know a number of people have used PHP and are using it quite successfully.

    One issue we have seen before is extra space at the beginning of the page. Typically the header has a bad opening. I recall one case where the openning bracket < was missing and one that had a $ sign at the beggining.

    Can you double check what you are posting .. any way you can post it to a page and see exactly what it is you are posting?

    Have you used our sample code to post your XML and see if that works?

    Regards,
    Click & Pledge Support Department.

    Leave a comment:


  • info@kindcards.org
    replied
    nusoap and xml Error

    I have fixed the xml. but still the result is the same. When I post the samex xml content to your https://developers.clickandpledge.com/verify/ i get as success response. I am using nusoap(php) and the code is


    require_once('soap/lib/nusoap.php');
    $params = array('instruction'=>$strParam);
    $client = new SoapClient('https://paas.cloud.clickandpledge.com/paymentservice.svc?wsdl', true);
    $client->soap_defencoding = 'UTF-8';
    $result = $client->call('Operation', $params);
    echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';

    a test page is available at
    Click & Pledge API- PHP Example

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Hello,

    The problem that you were seeing is 2 fold. Please see the attached document.

    1) Inside of the CurrentTotals area you were missing TotalDiscount, TotalTax, & TotalDeductible. This was the cause of the XML error.

    2) After correcting this I came across the second error in that the Total attempting to processing is 4500. The correct amount to process is 1800. Here is the breakdown:

    2000 (unit price)
    +400 (unit tax)
    -600 (unit discount)
    =1800 (Total)

    Please save any XML scheme to a Notepad document before posting to the forum.
    Attached Files

    Leave a comment:


  • info@kindcards.org
    started a topic Director

    Director

    Trying to get approval for credit card transaction and getting this error message.

    Array
    (
    [OperationResult] => Array
    (
    [ResultCode] => 2051
    [ResultData] => Xml Error
    [TransactionNumber] =>
    )
    See XML Document BELOW OR HERE

    https://www.scourby.com/click.php



    <CnPAPI xmlns="urn:APISchema.xsd">
    <Version>12</Version>
    <Engine>
    <Request>
    <Operation>
    <OperationType>Transaction</OperationType>
    <IPAddress>192.168.0.11</IPAddress>
    </Operation>
    <Authentication>
    <AccountGuid>04c65879-36fc-452f-937d-4fac2465b97e</AccountGuid>
    <AccountID>11083</AccountID>
    <UserName>b49e8fec828cb6894f0a</UserName>
    <Password>f3b08c19cf15832f4f2b</Password>
    </Authentication>
    <Order>
    <OrderMode>Test</OrderMode>
    <Tracker>sponsor1</Tracker>
    <CardHolder>
    <BillingInformation>
    <BillingFirstName>John</BillingFirstName>
    <BillingMI>C</BillingMI>
    <BillingLastName>Smith</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>
    <ShippingInformation>
    <ShippingAddress>
    <ShippingAddress1>123 Shipping Avenue</ShippingAddress1>
    <ShippingAddress2>Suite 1234</ShippingAddress2>
    <ShippingAddress3></ShippingAddress3>
    <ShippingCity>John City</ShippingCity>
    <ShippingStateProvince>Big State</ShippingStateProvince>
    <ShippingPostalCode>12345-4564</ShippingPostalCode>
    <ShippingCountryCode>840</ShippingCountryCode>
    </ShippingAddress>
    </ShippingInformation>
    <CustomFieldList>
    <CustomField>
    <FieldName>Employer</FieldName>
    <FieldValue>Good Company</FieldValue>
    </CustomField>
    <CustomField>
    <FieldName>Occupation</FieldName>
    <FieldValue>Good Job</FieldValue>
    </CustomField>
    <CustomField>
    <FieldName>Place of Employment</FieldName>
    <FieldValue>Blacksburg, Virginia</FieldValue>
    </CustomField>
    </CustomFieldList>
    <PaymentMethod>
    <PaymentType>CreditCard</PaymentType>
    <CreditCard>
    <NameOnCard>John Smith</NameOnCard>
    <CardNumber>4111111111111111</CardNumber>
    <Cvv2>123</Cvv2>
    <ExpirationDate>04/15</ExpirationDate>
    </CreditCard>
    </PaymentMethod>
    </CardHolder>
    <OrderItemList>
    <OrderItem>
    <ItemID>1</ItemID>
    <ItemName>Conference Dinner</ItemName>
    <Quantity>1</Quantity>
    <UnitPrice>2000</UnitPrice>
    <UnitDeductible>300</UnitDeductible>
    <UnitTax>400</UnitTax>
    <UnitDiscount>600</UnitDiscount>
    </OrderItem>
    </OrderItemList>
    <Transaction>
    <TransactionType>Authorize</TransactionType>
    <DynamicDescriptor>DynamicDescriptor</DynamicDescriptor>
    <CurrentTotals>
    <Total>4500</Total>
    </CurrentTotals>
    </Transaction>
    </Order>
    </Request>
    </Engine>
    </CnPAPI>
Working...
X