Payment system response

Successful order placement

When the payment system receives a request for a PayPal payment, the system attempts to place the order with PayPal. If this order placement process works, the system replies with a response similar to this example:

 

Copy
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN""http://dtd.wp.fte92.test.worldpay.com/dtd/paymentService_v1.dtd">
<paymentService version="1.4" merchantCode="MERCHANT_CODE">
    <reply>
        <orderStatus orderCode="jsxml389341371">
            <payment>
                <paymentMethod>PAYPAL-SSL</paymentMethod>
                <amount value="101" currencyCode="EUR" exponent="2" debitCreditIndicator="credit"/>
                <lastEvent>WAITING_FOR_SHOPPER</lastEvent>
            </payment>
            <reference id="9R693096PA418183R">
            https://www.paypal.com/checkoutnow?token=9R693096PA418183R
            </reference>
        </orderStatus>
    </reply>
</paymentService>

 

The reply includes the order code, a unique numeric reference to the order, and a redirection URL for PayPal. It is up to you to redirect the shopper to this URL. Note that the ampersands (&) in URLs are escaped with SGML entities. The escapes allow you to include the ampersands in XML messages and must be converted back into the plain & sign by you in order to create a valid URL and ensure the redirect is correct.

Order placement fails

If the initial attempt to place the order with PayPal fails, the system replies with a response similar to this example:

 

Copy
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE paymentService PUBLIC "-//Bibit//DTD Bibit PaymentService v1//EN" "http://dtd.bibit.com/paymentService_v1.dtd">
<paymentService version="1.3" merchantCode="MERCHANT_CODE"> <!--Will contain the merchant code used in the request-->
    <reply>
        <orderStatus orderCode="ORDER_CODE"> <!--Will contain the order code used in the request-->
            <error code="7">
            <![CDATA[No response received from PayPal]]>
            </error>
        </orderStatus>
    </reply>
</paymentService>