I'm trying to implement a payment gateway with oracle Apex 5.1. I have all the setup Oracle apex 5.1, Database 11gR2, ORDS 3.0.9 with ssl enabled. I need to call a REST API of a payment gateway provider with 12 parameters. How can I achieve this. I'm not much familiar with this payment gateway functionality . I expect some one will guide me to implement a payment gateway in oracle apex.
What I have the API Link and parameter. How to start the process I'm not sure. My first target is to call their Payment Gateway.
I have created a branch to redirect this url under function returning URL I put this code.
declare
v_url varchar2(32767);
l_clob clob;
v_store_id varchar2(1000);
v_store_passwd varchar2(1000);
v_total_amount number;
v_currency varchar2(20);
v_tran_id varchar2(1000);
v_success_url varchar2(2000);
v_fail_url varchar2(2000);
v_cancel_url varchar2(2000);
v_emi_option number;
v_cus_name varchar2(200);
v_cus_email varchar2(100);
v_cus_phone varchar2(200);
begin
v_store_id :=UTL_URL.Escape(:P3_STORE_ID,TRUE);
v_store_passwd :=UTL_URL.Escape(:P3_STORE_PASSWD,TRUE);
v_total_amount :=UTL_URL.Escape(:P3_TOTAL_AMOUNT,TRUE);
v_currency :=UTL_URL.Escape(:P3_CURRENCY,TRUE);
v_tran_id :=UTL_URL.Escape(:P3_TRAN_ID,TRUE);
v_success_url :=UTL_URL.Escape(:P3_SUCCESS_URL,TRUE);
v_fail_url :=UTL_URL.Escape(:P3_FAIL_URL,TRUE);
v_cancel_url :=UTL_URL.Escape(:P3_CANCEL_URL,TRUE);
v_emi_option :=UTL_URL.Escape(:P3_EMI_OPTION,TRUE);
v_cus_name :=UTL_URL.Escape(:P3_FIRSTNAME,TRUE);
v_cus_email :=UTL_URL.Escape(:P3_EMAIL,TRUE);
v_cus_phone :=UTL_URL.Escape(:P3_PHONE,TRUE);
v_url :='https://sandbox.XXXXXXXXXXXX/api.php?'
||'store_id='||v_store_id
||'&'||'store_passwd='||v_store_passwd
||'&'||'total_amount='||v_total_amount
||'&'||'currency='||v_currency
||'&'||'tran_id='||v_tran_id
||'&'||'success_url='||v_success_url
||'&'||'fail_url='||v_fail_url
||'&'||'cancel_url='||v_cancel_url
||'&'||'emi_option='||v_emi_option
||'&'||'cus_name='||v_cus_name
||'&'||'cus_email='||v_cus_email
||'&'||'cus_phone='||v_cus_phone;
l_clob := apex_web_service.make_rest_request(p_url => v_url,
p_http_method => 'POST',
p_wallet_path => 'D:\app\oracle\product\11.2.0\dbhome_1\BIN\owm\wallets\Administrator',
p_wallet_pwd => 'WalletPasswd123');
return l_clob;
end;
This is the initial code I have tried with Apex but no luck. It gives me error "wwv_flow.branch_func_returning_url_error. "Hoping someone will rescue me.
Thanks