0

I want to implement express checkout link with 2CO payment gateway ; tested the following code:

public void testExpressCheckoutF()
    {
        Twocheckout.apiusername = "sonoratestw";
        Twocheckout.apipassword = "sonorasonora";
        Twocheckout.privatekey = "81DBF3R3-04B3-47DB-8068-ED3DAB20BC5A";
        Twocheckout.mode = "sandbox";

        HashMap<String, String> params = new HashMap<>();
        params.put("sid", "901328163");
        params.put("mode", "sandbox");
        params.put("currency_code", "USD");
        params.put("x_receipt_link_url", "http://www.test.com/summary_twocheckoutl_payment.xhtml");
        params.put("comment", "some description");


        params.put("li_0_product_id", "assdsdcas");
        params.put("li_0_type", "product");
        params.put("li_0_name", "test name");
        params.put("li_0_quantity", String.valueOf(1));
        params.put("li_0_price", String.valueOf(33));
        params.put("li_0_description", "some description");

        String expressCheckout = TwocheckoutCharge.url(params);

        System.out.println("\n " + expressCheckout);
    }

But when I run the code I always get ERROR CODE:PE104. I found this post as a possible solution http://help.2checkout.com/articles/Knowledge_Article/Error-Code-PE104/?l=en_US&fs=RelatedArticle

But still getting the same error. Can you propose some solution?

Shekhu
  • 1,998
  • 5
  • 23
  • 49
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808

1 Answers1

0

Please try removing the li_0_product_id param and trying again or changing the value to an integer and not a string. The article you linked to gives you general areas to start (no lineitems, invalid product_id, etc..) so it's just process of elimination at this point.

wtrmLn
  • 121
  • 1
  • 2