API integration

Hi All,

we are part of the "Paid on Results" affiliate network, and they need us to put the below code into our success page so it sends the booking ID and Value to them. This is the code i have, and it doesnt work. Would anyone have any ideas or perhaps you can help me with a server to server pixel tracking instead!  Losing the will to live with this! Thank you


<script type="text/javascript" language="JavaScript" src="https://portgk.com/create-sale?client=java&amp;MerchantID=1027&amp;SaleID={$BOOKING_ID}&amp;OrderValue={$BOOKING_TOTAL}"></script>
<noscript><img src="https://portgk.com/create-sale?client=img&MerchantID=1027&SaleID={$BOOKING_ID}&OrderValue={$BOOKING_TOTAL}" width="10" height="10" border="0"></noscript>{/literal}

Comments

  • Hi bumpers,

    You won't be able to inject that script into Checkfront's hosted booking page, but you can use our "Custom Receipt URL" feature to redirect your users to one of your own pages after a transaction is made.

    Here's a link to our support document for more information.
    https://www.checkfront.com/support/docs/manage/ecommerce#custom

    Making this work would likely involve having a developer capture the incoming booking_id and booking_total values and translate them into values in the script you want to execute.

    If you were using PHP on your server, assuming you used a custom receipt URL of https://yoursite.com/receipt/?booking_id={$BOOKING_ID}&booking_total={$BOOKING_TOTAL}, the code for that page might look something like the following.

    <h1>Thanks for your purchase</h1>
    ...
    <script type="text/javascript" language="JavaScript"
    src="https://portgk.com/create-sale?client=java&amp;MerchantID=1027&amp;
    SaleID=<?= $_GET['booking_id'] ?>
    &amp;OrderValue=<?= $_GET['booking_total'] ?>"></script>
    <noscript><img src="https://portgk.com/create-sale?client=img&MerchantID=1027
    &SaleID=
    <?= $_GET['booking_id'] ?>&OrderValue=<?= $_GET['booking_total'] ?>"
    width="10" height="10" border="0"></noscript>

    Hope that helps,

    Kevin

  • Hi Kevin , thank you so.much for your help. I must admit I have no clue.

    I am using cms made simple for my site and have a customer thank you page. So do i direct clients to this page once they have paid ?

    I can do that no problem

    With the code that you gave me above, is that a simple cut and paste into the success page or something.more complicated?

    Sorry to be useless ..any help greatly appreciated.

    Thanks v v much
  • Hi Kevin, i have tried the code, this is what comes out.

    Our Reference NTEN1000K
    Status Pending
    Cookie Set-Date 01 Mar 2016 - 22:22:57
    Order Date 01 Mar 2016 - 22:30:09
    Pending Date 01 Mar 2016 - 22:35:26
    Sale ID ?
    IP Address 86.162.95.60
    IP Location
    UNITED KINGDOM
    UNITED KINGDOM
    Creative Standard Text Link
    Referral No HTTP Referral

    So i get a ? for saleID and nothing for the Value

    i fear i have messed it up.

  • Hi bumpers,

    I would recommend that you reach out to a developer to have them perform this work for you. As helping with custom scripting is out of the realms of what our support offers.

    Kevin provided a basic explanation that you can pass along to someone who is a programmer. The example will not work to just copy and paste if you aren't using PHP as your server side language.

    Best regards,
    Mitch
  • I am completely agreed with Mltch You should consult an expert developer who can help you out with the custom code. As did with my Bulk SMS API code
Sign In or Register to comment.