简体   繁体   中英

Sage Pay form integration encoding

<html>
<form name="pp_form" action="https://test.sagepay.com/Simulator/VSPServerGateway.asp?Service=VendorRegisterTx" method="post">
    <input name="VPSProtocol" type="hidden" value=2.23 />
    <input name="TxType" type="hidden" value=PAYMENT />
    <input name="Vendor" type="hidden" value="myusername" />
    <input name="VendorTxCode" type="hidden" value="thevendortxcode" />
    <input name="Amount" type="hidden" value="30" />
    <input name="Currency" type="hidden" value="GBP" />
    <input name="Description" type="hidden" value="Test payment" />
    <input name="NotificationURL" type="hidden" value="myurl" />
    BillingFirstnames: <input name="BillingFirstnames" type="text" /><br>
    BillingSurname: <input name="BillingSurname" type="text" /><br>
    BillingAddress1: <input name="BillingAddress1" type="text" /><br>
    BillingCity: <input name="BillingCity" type="text" /><br>
    BillingPostCode: <input name="BillingPostCode" type="text" /><br>
    BillingCountry: <input name="BillingCountry" type="text" /><br>
    DeliverySurname: <input name="DeliverySurname" type="text" /><br>
    DeliveryFirstnames: <input name="DeliveryFirstnames" type="text" /><br>
    DeliveryAddress1: <input name="DeliveryAddress1" type="text" /><br>
    DeliveryCity: <input name="DeliveryCity" type="text" /><br>
    DeliveryPostCode: <input name="DeliveryPostCode" type="text" /><br>
    DeliveryCountry: <input name="DeliveryCountry" type="text" /><br>
    <p>Click here to submit 
        <input type="submit" value="here">
    </p>
</form>
</html>

This form currently works using the simulator. Clearly, none of this is being encoded. Firstly, will this work on the test/live environment? Secondly, am I allowed to do it this way and if not, how can I correct it?

Thanks

Alex

It's not going to work. Firstly, the simulator is so far out of date that it doesn't even support protocol 3.00 (earlier ones are deprecated and will cease to function in the live environment from July). Some key features are also missing.

Secondly, you appear to want to use the Server protocol. The registration post for this consists of the values you have above as name-value pairs, posted as the request body to https://test.sagepay.com/gateway/service/vspserver-register.vsp

I recommend having a look at the Server protocol document on sagepay.co.uk - using the simulator isn't going to help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM