0 Replies Latest reply: Apr 10, 2013 6:51 AM by Arshad00 RSS

    Calling a REST webservice with pl/sql and parse XML

    Arshad00
      Hi
      I hope someone is able to help me with this task. I'm newbie with Oracle APEX, have not developed advanced applications yet. A few days ago I installed one of the package application with customer and order. I want to integrate with online shopping with Rest service using PL / SQL. NETS is a provider of online payment systems.

      http://www.betalingsterminal.no/Netthandel-forside/Teknisk-veiledning/Communication/REST/

      There are four steps you must go through to execute the payment. where it is retunert xml files containing infomation to be used further.

      Step 1 - Register payment

      Webshop Performs Register:

      https://epayment-test.bbs.no/Netaxept/Register.aspx?MerchantId=9999997&token=secret&orderNumber=10011&amount=200&CurrencyCode=NOK
      &redirectUrl=http://webshop/RegisterReply.asp

      Reply from payment provider:

      <? Xml version = "1.0"?>
      <RegisterResponse Xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <TransactionId> B127f98b77f741fca6bb49981ee6e846 </ TransactionId>
      </ Register Response>

      Step 2 - Present Web form to customer

      Webshop's customer submit web form:

      https://epayment-test.bbs.no/Terminal/default.aspx?merchantId=9999997&transactionId=b127f98b77f741fca6bb49981ee6e846

      Step 3 - "Redirect" customer back to merchant

      Payment provider send URL to redirect webshop's customer:

      http://webshop/RegisterReply.asp?transactionId=b127f98b77f741fca6bb49981ee6e846&responseCode=OK

      Step 4 - Process payment

      Webshop Performs Process (AUTH):

      https://epayment-test.bbs.no/Netaxept/Process.aspx?merchantId=9999997&token=&transactionId=b127f98b77f741fca6bb49981ee6e846&operation=AUTH

      Reply from payment provider:
      <? Xml version = "1.0"?>
      <Process Response xmlns: XSi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = "http://www.w3.org/2001/XMLSchema">
      <Operation> AUTH </ Operation>
      <ResponseCode> OK </ Response Code>
      <AuthorizationId> 064392 </ AuthorizationId>
      <TransactionId> B127f98b77f741fca6bb49981ee6e846 </ TransactionId>
      <ExecutionTime> 2009-12-16T11: 17:54.633125 +01:00 </ ExecutionTime>
      <MerchantId> 9999997 </ MerchantId>
      </ Process Response>

      Webshop Performs Process (CAPTURE)

      https://epayment-test.bbs.no/Netaxept/Process.aspx?merchantId=9999997&token=&transactionId=b127f98b77f741fca6bb49981ee6e846
      &transactionAmount=200&operation=CAPTURE

      Reply from payment provider:
      <? Xml version = "1.0"?>
      <ProcessResponse Xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Operation> CAPTURE </ Operation>
      <ResponseCode> OK </ Response Code>
      <TransactionId> B127f98b77f741fca6bb49981ee6e846 </ TransactionId>
      <ExecutionTime> 2009-12-16T11: 40:57.601875 +01:00 </ ExecutionTime>
      <MerchantId> 9999997 </ MerchantId>
      </ Process Response>

      I really appreciate if anyone can help me with This