<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Session time after sending post request on Jakarta EE in cybersource APIs</title>
    <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Session-time-after-sending-post-request-on-Jakarta-EE/m-p/90702#M1930</link>
    <description>&lt;P&gt;Hello all,&lt;BR /&gt;I am trying to send a post request to retreive the checkout page. But everytime i receive session time out page.&lt;BR /&gt;Can someone had this same issue?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;public String submit2() throws InvalidKeyException, NoSuchAlgorithmException, KeyManagementException {&lt;BR /&gt;DATE = getUTCDateTime();&lt;BR /&gt;MERCHANT_ID = "";&lt;BR /&gt;PROFIL_ID = "";&lt;BR /&gt;ACCESS_KEY = "";&lt;BR /&gt;DF_ORG_ID = "";&lt;BR /&gt;SECRET_KEY = "";&lt;BR /&gt;TRANSACTION_UID = UUID.randomUUID().toString();&lt;BR /&gt;SESSION_ID = getSessionId();&lt;BR /&gt;REFERENCE_NUMBER = "";&lt;BR /&gt;AMOUNT = "";&lt;BR /&gt;CURRENCY = "";&lt;BR /&gt;MERCHANT_DESC = "";&lt;BR /&gt;try {&lt;BR /&gt;SIGN_DATA = generateParametter();&lt;BR /&gt;} catch (InvalidKeyException ex) {&lt;BR /&gt;Logger.getLogger(PaiementClient.class.getName()).log(Level.SEVERE, null, ex);&lt;BR /&gt;} catch (NoSuchAlgorithmException ex) {&lt;BR /&gt;Logger.getLogger(PaiementClient.class.getName()).log(Level.SEVERE, null, ex);&lt;BR /&gt;}&lt;BR /&gt;SSLContext sc = SSLContext.getInstance("TLS");&lt;BR /&gt;sc.init(null, trustAllCerts, new SecureRandom());&lt;BR /&gt;Cookie jsessionidCookie = new Cookie("jsessionid", SESSION_ID, "/", null, 600);&lt;BR /&gt;Client client = ClientBuilder.newBuilder()&lt;BR /&gt;.sslContext(sc)&lt;BR /&gt;.connectTimeout(30, TimeUnit.SECONDS)&lt;BR /&gt;.hostnameVerifier((hostname, session) -&amp;gt; true) // Trust all hostnames&lt;BR /&gt;.build();&lt;BR /&gt;Form form = new Form()&lt;BR /&gt;.param("access_key", ACCESS_KEY)&lt;BR /&gt;.param("amount", AMOUNT)&lt;BR /&gt;.param("auth_trans_ref_no", REFERENCE_NUMBER)&lt;BR /&gt;.param("bill_to_address_city", "Mountain View")&lt;BR /&gt;.param("bill_to_address_country", "US")&lt;BR /&gt;.param("bill_to_address_line1", "1295 Charleston Rd")&lt;BR /&gt;.param("bill_to_address_line2", "1295 Charleston Rd")&lt;BR /&gt;.param("bill_to_address_postal_code", "94043")&lt;BR /&gt;.param("bill_to_address_state", "CA")&lt;BR /&gt;.param("bill_to_email", "null@cybersource.com")&lt;BR /&gt;.param("bill_to_forename", "Noreal")&lt;BR /&gt;.param("bill_to_phone", "+662-2962-000")&lt;BR /&gt;.param("bill_to_surname", "Name")&lt;BR /&gt;.param("currency", CURRENCY)&lt;BR /&gt;.param("customer_ip_address", "0:0:0:0:0:0:0:1")&lt;BR /&gt;.param("item_0_code", "KFLTFDIV")&lt;BR /&gt;.param("item_0_name", "KFLTFDIV")&lt;BR /&gt;.param("item_0_quantity", "100")&lt;BR /&gt;.param("item_0_sku", "sku001")&lt;BR /&gt;.param("item_0_unit_price", "5.72")&lt;BR /&gt;.param("item_1_code", "KFLTFD70")&lt;BR /&gt;.param("item_1_name", "KFLTFD70")&lt;BR /&gt;.param("item_1_quantity", "100")&lt;BR /&gt;.param("item_1_sku", "sku002")&lt;BR /&gt;.param("item_1_unit_price", "10.00")&lt;BR /&gt;.param("line_item_count", "2")&lt;BR /&gt;.param("locale", "en-us")&lt;BR /&gt;.param("merchant_defined_data1", "MDD#1")&lt;BR /&gt;.param("merchant_defined_data2", "MDD#2")&lt;BR /&gt;.param("merchant_defined_data3", "MDD#3")&lt;BR /&gt;.param("merchant_defined_data4", "MDD#4")&lt;BR /&gt;.param("merchant_descriptor", MERCHANT_DESC)&lt;BR /&gt;.param("override_custom_cancel_page", "&lt;A href="http://localhost:12457/jsp/sa-wm/response.jsp" target="_blank"&gt;http://localhost:12457/jsp/sa-wm/response.jsp&lt;/A&gt;")&lt;BR /&gt;.param("override_custom_receipt_page", "&lt;A href="http://localhost:12457/jsp/sa-wm/response.jsp" target="_blank"&gt;http://localhost:12457/jsp/sa-wm/response.jsp&lt;/A&gt;")&lt;BR /&gt;.param("payment_method", "card")&lt;BR /&gt;.param("profile_id", PROFIL_ID)&lt;BR /&gt;.param("reference_number", REFERENCE_NUMBER)&lt;BR /&gt;.param("signed_date_time", DATE)&lt;BR /&gt;.param("signed_field_names", "profile_id,access_key,transaction_uuid,signed_field_names,unsigned_field_names,signed_date_time,locale,payment_method,transaction_type,reference_number,auth_trans_ref_no,amount,currency,merchant_descriptor,override_custom_cancel_page,override_custom_receipt_page")&lt;BR /&gt;.param("transaction_type", "sale")&lt;BR /&gt;.param("transaction_uuid", TRANSACTION_UID)&lt;BR /&gt;.param("unsigned_field_names", "device_fingerprint_id,bill_to_forename,bill_to_surname,bill_to_email,bill_to_phone,bill_to_address_line1,bill_to_address_line2,bill_to_address_city,bill_to_address_state,bill_to_address_country,bill_to_address_postal_code,customer_ip_address,line_item_count,item_0_code,item_0_sku,item_0_name,item_0_quantity,item_0_unit_price,item_1_code,item_1_sku,item_1_name,item_1_quantity,item_1_unit_price,merchant_defined_data1,merchant_defined_data2,merchant_defined_data3,merchant_defined_data4")&lt;BR /&gt;.param("device_fingerprint_id", SESSION_ID)&lt;BR /&gt;.param("jsessionid", SESSION_ID)&lt;BR /&gt;.param("signature", SIGN_DATA);&lt;/P&gt;&lt;P&gt;Response response = client.target("&lt;A href="https://testsecureacceptance.cybersource.com/pay" target="_blank"&gt;https://testsecureacceptance.cybersource.com/pay&lt;/A&gt;")&lt;BR /&gt;.request(MediaType.APPLICATION_FORM_URLENCODED)&lt;BR /&gt;.accept(MediaType.TEXT_PLAIN)&lt;BR /&gt;.post(Entity.form(form));&lt;BR /&gt;try {&lt;BR /&gt;FacesContext.getCurrentInstance().getExternalContext().redirect("&lt;A href="https://testsecureacceptance.cybersource.com/checkout" target="_blank"&gt;https://testsecureacceptance.cybersource.com/checkout&lt;/A&gt;");&lt;BR /&gt;} catch (IOException ex) {&lt;BR /&gt;Logger.getLogger(PaiementClient.class.getName()).log(Level.SEVERE, null, ex);&lt;BR /&gt;}&lt;BR /&gt;return null;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Not that when submit using a&amp;nbsp; form with all those data it work perfectly&lt;/P&gt;</description>
    <pubDate>Sat, 09 Nov 2024 17:54:53 GMT</pubDate>
    <dc:creator>samsonsouley</dc:creator>
    <dc:date>2024-11-09T17:54:53Z</dc:date>
    <item>
      <title>Session time after sending post request on Jakarta EE</title>
      <link>https://community.developer.cybersource.com/t5/cybersource-APIs/Session-time-after-sending-post-request-on-Jakarta-EE/m-p/90702#M1930</link>
      <description>&lt;P&gt;Hello all,&lt;BR /&gt;I am trying to send a post request to retreive the checkout page. But everytime i receive session time out page.&lt;BR /&gt;Can someone had this same issue?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;public String submit2() throws InvalidKeyException, NoSuchAlgorithmException, KeyManagementException {&lt;BR /&gt;DATE = getUTCDateTime();&lt;BR /&gt;MERCHANT_ID = "";&lt;BR /&gt;PROFIL_ID = "";&lt;BR /&gt;ACCESS_KEY = "";&lt;BR /&gt;DF_ORG_ID = "";&lt;BR /&gt;SECRET_KEY = "";&lt;BR /&gt;TRANSACTION_UID = UUID.randomUUID().toString();&lt;BR /&gt;SESSION_ID = getSessionId();&lt;BR /&gt;REFERENCE_NUMBER = "";&lt;BR /&gt;AMOUNT = "";&lt;BR /&gt;CURRENCY = "";&lt;BR /&gt;MERCHANT_DESC = "";&lt;BR /&gt;try {&lt;BR /&gt;SIGN_DATA = generateParametter();&lt;BR /&gt;} catch (InvalidKeyException ex) {&lt;BR /&gt;Logger.getLogger(PaiementClient.class.getName()).log(Level.SEVERE, null, ex);&lt;BR /&gt;} catch (NoSuchAlgorithmException ex) {&lt;BR /&gt;Logger.getLogger(PaiementClient.class.getName()).log(Level.SEVERE, null, ex);&lt;BR /&gt;}&lt;BR /&gt;SSLContext sc = SSLContext.getInstance("TLS");&lt;BR /&gt;sc.init(null, trustAllCerts, new SecureRandom());&lt;BR /&gt;Cookie jsessionidCookie = new Cookie("jsessionid", SESSION_ID, "/", null, 600);&lt;BR /&gt;Client client = ClientBuilder.newBuilder()&lt;BR /&gt;.sslContext(sc)&lt;BR /&gt;.connectTimeout(30, TimeUnit.SECONDS)&lt;BR /&gt;.hostnameVerifier((hostname, session) -&amp;gt; true) // Trust all hostnames&lt;BR /&gt;.build();&lt;BR /&gt;Form form = new Form()&lt;BR /&gt;.param("access_key", ACCESS_KEY)&lt;BR /&gt;.param("amount", AMOUNT)&lt;BR /&gt;.param("auth_trans_ref_no", REFERENCE_NUMBER)&lt;BR /&gt;.param("bill_to_address_city", "Mountain View")&lt;BR /&gt;.param("bill_to_address_country", "US")&lt;BR /&gt;.param("bill_to_address_line1", "1295 Charleston Rd")&lt;BR /&gt;.param("bill_to_address_line2", "1295 Charleston Rd")&lt;BR /&gt;.param("bill_to_address_postal_code", "94043")&lt;BR /&gt;.param("bill_to_address_state", "CA")&lt;BR /&gt;.param("bill_to_email", "null@cybersource.com")&lt;BR /&gt;.param("bill_to_forename", "Noreal")&lt;BR /&gt;.param("bill_to_phone", "+662-2962-000")&lt;BR /&gt;.param("bill_to_surname", "Name")&lt;BR /&gt;.param("currency", CURRENCY)&lt;BR /&gt;.param("customer_ip_address", "0:0:0:0:0:0:0:1")&lt;BR /&gt;.param("item_0_code", "KFLTFDIV")&lt;BR /&gt;.param("item_0_name", "KFLTFDIV")&lt;BR /&gt;.param("item_0_quantity", "100")&lt;BR /&gt;.param("item_0_sku", "sku001")&lt;BR /&gt;.param("item_0_unit_price", "5.72")&lt;BR /&gt;.param("item_1_code", "KFLTFD70")&lt;BR /&gt;.param("item_1_name", "KFLTFD70")&lt;BR /&gt;.param("item_1_quantity", "100")&lt;BR /&gt;.param("item_1_sku", "sku002")&lt;BR /&gt;.param("item_1_unit_price", "10.00")&lt;BR /&gt;.param("line_item_count", "2")&lt;BR /&gt;.param("locale", "en-us")&lt;BR /&gt;.param("merchant_defined_data1", "MDD#1")&lt;BR /&gt;.param("merchant_defined_data2", "MDD#2")&lt;BR /&gt;.param("merchant_defined_data3", "MDD#3")&lt;BR /&gt;.param("merchant_defined_data4", "MDD#4")&lt;BR /&gt;.param("merchant_descriptor", MERCHANT_DESC)&lt;BR /&gt;.param("override_custom_cancel_page", "&lt;A href="http://localhost:12457/jsp/sa-wm/response.jsp" target="_blank"&gt;http://localhost:12457/jsp/sa-wm/response.jsp&lt;/A&gt;")&lt;BR /&gt;.param("override_custom_receipt_page", "&lt;A href="http://localhost:12457/jsp/sa-wm/response.jsp" target="_blank"&gt;http://localhost:12457/jsp/sa-wm/response.jsp&lt;/A&gt;")&lt;BR /&gt;.param("payment_method", "card")&lt;BR /&gt;.param("profile_id", PROFIL_ID)&lt;BR /&gt;.param("reference_number", REFERENCE_NUMBER)&lt;BR /&gt;.param("signed_date_time", DATE)&lt;BR /&gt;.param("signed_field_names", "profile_id,access_key,transaction_uuid,signed_field_names,unsigned_field_names,signed_date_time,locale,payment_method,transaction_type,reference_number,auth_trans_ref_no,amount,currency,merchant_descriptor,override_custom_cancel_page,override_custom_receipt_page")&lt;BR /&gt;.param("transaction_type", "sale")&lt;BR /&gt;.param("transaction_uuid", TRANSACTION_UID)&lt;BR /&gt;.param("unsigned_field_names", "device_fingerprint_id,bill_to_forename,bill_to_surname,bill_to_email,bill_to_phone,bill_to_address_line1,bill_to_address_line2,bill_to_address_city,bill_to_address_state,bill_to_address_country,bill_to_address_postal_code,customer_ip_address,line_item_count,item_0_code,item_0_sku,item_0_name,item_0_quantity,item_0_unit_price,item_1_code,item_1_sku,item_1_name,item_1_quantity,item_1_unit_price,merchant_defined_data1,merchant_defined_data2,merchant_defined_data3,merchant_defined_data4")&lt;BR /&gt;.param("device_fingerprint_id", SESSION_ID)&lt;BR /&gt;.param("jsessionid", SESSION_ID)&lt;BR /&gt;.param("signature", SIGN_DATA);&lt;/P&gt;&lt;P&gt;Response response = client.target("&lt;A href="https://testsecureacceptance.cybersource.com/pay" target="_blank"&gt;https://testsecureacceptance.cybersource.com/pay&lt;/A&gt;")&lt;BR /&gt;.request(MediaType.APPLICATION_FORM_URLENCODED)&lt;BR /&gt;.accept(MediaType.TEXT_PLAIN)&lt;BR /&gt;.post(Entity.form(form));&lt;BR /&gt;try {&lt;BR /&gt;FacesContext.getCurrentInstance().getExternalContext().redirect("&lt;A href="https://testsecureacceptance.cybersource.com/checkout" target="_blank"&gt;https://testsecureacceptance.cybersource.com/checkout&lt;/A&gt;");&lt;BR /&gt;} catch (IOException ex) {&lt;BR /&gt;Logger.getLogger(PaiementClient.class.getName()).log(Level.SEVERE, null, ex);&lt;BR /&gt;}&lt;BR /&gt;return null;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Not that when submit using a&amp;nbsp; form with all those data it work perfectly&lt;/P&gt;</description>
      <pubDate>Sat, 09 Nov 2024 17:54:53 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/cybersource-APIs/Session-time-after-sending-post-request-on-Jakarta-EE/m-p/90702#M1930</guid>
      <dc:creator>samsonsouley</dc:creator>
      <dc:date>2024-11-09T17:54:53Z</dc:date>
    </item>
  </channel>
</rss>

