Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Knowles 141 posts 222 karma points
    Mar 05, 2013 @ 16:10
    Chris Knowles
    0

    Sagepay Stock codes not matching up

    When SagePay is downloading orders to Sage Accounts, our client is getting the a message saying that the basket is not correctly formatted so they stock code doesn't match up with the accounts package.

    SagePay tech support have directed me to the following link: http://www.sage.co.uk/asksage/viewarticle.asp?p_faqid=29245&DIV=SBD which says the basket input to SagePay should be in the following order:

    No of Item lines:[stock code]stock code:quantity:net value:VAT value:gross value:gross value

    I'm not sure why it needs some items twice but that's what the article says.

    Has anyone had this problem before and if so what did you do it fix it? If not, any ideas why it wouldn't be in the needed format and how i'd change it so it would be?

    Thanks

    Chris

     

  • Anders Burla 2560 posts 8256 karma points
    Mar 05, 2013 @ 17:04
    Anders Burla
    0

    Hi Chris

    Could you try and see in the source code for the payment provider how it formats the data - as I cant remember. The source is here:
    https://bitbucket.org/teasolutions/tea-commerce-tea-commerce-payment-providers

    Kind regards
    Anders

  • Chris Knowles 141 posts 222 karma points
    Mar 05, 2013 @ 18:28
    Chris Knowles
    0

    Anders,

    I can't see in the SagePay.cs file where it puts together the data to send to SagePay. Which section should i be looking?

    Chris

  • Anders Burla 2560 posts 8256 karma points
    Mar 05, 2013 @ 18:53
    Anders Burla
    0

    Line 84 to 109 is where the input fields is filled woth data. That data is send in line 111.

  • Chris Knowles 141 posts 222 karma points
    Mar 06, 2013 @ 11:17
    Chris Knowles
    0

    Anders,

    I see the lines but i don't see anything that formats them before it passes it to SagePay apart from truncating strings.

    Am i missing something?

    Thanks

    Chris

  • Anders Burla 2560 posts 8256 karma points
    Mar 06, 2013 @ 16:46
    Anders Burla
    0

    I cant remember the SagePay API 100% and if I needed to debug it I would quickly use a couple of hours doing it :) Could you try and debug to see what data is exactly send to SagePay and ask them what is wrong with the data. I know this provider is working as i have tested it using our test website.

    Kind regards
    Anders

  • Chris Knowles 141 posts 222 karma points
    Mar 07, 2013 @ 15:05
    Chris Knowles
    0

    Anders,

    As we have bought the license for this site, i was hoping you could help me out with debugging this issue :)

    The provider is working but it's how the details formatted and passed to SagePay to allow them to match up with the stockcodes in the Sage accounts that is the problem. I am a little surprised that no-one else has had this problem given how popular Sage accounts is.

    The string should be in the following format: No of Item lines:[stock code]stock code:quantity:net value:VAT value:gross value:gross value as per the article i have listed above.

    I need to get this sorted out ASAP as the site is ready to go live as soon as the codes match up.

    Thanks
    Chris 

  • Anders Burla 2560 posts 8256 karma points
    Mar 08, 2013 @ 11:37
    Anders Burla
    0

    Hi Chris

    Mike Hughes from Write Media have implemented the cart info for the SagePay provider. Try send him an email - he can properly send you the code. mike at writemedia.co.uk

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft