Posts

Generate a payment source ID in Oracle Apex for the Square API using JavaScript:

In Oracle Apex, create a new page with a form that will collect the necessary information for creating a payment source (such as card details). Create a new JavaScript function that will be called when the form is submitted. In the JavaScript function, use the fetch method to make a request to the Square API endpoint for creating a new payment source, passing in the necessary information and the API key in the request headers. The response from the API will contain the generated payment source ID, which you can extract using the json() method on the response object. You can store the payment source ID in a custom database table or session state for later use. function createPaymentSource() {     // Collect the necessary information from the form     var cardDetails = {         "card_number": $("#card_number").val(),         "exp_month": $("#exp_month").val(),         "exp_year": $("#exp_year").val(),         "cvv": $

How to Integrate Stripe Payment with Oracle APEX

 1. Create a new Apex application and add a page to it. 2. Create a form on the page with input fields for the customer's credit card information, such as 3. the card number, expiration date, and CVV code. 4. Include a button on the form to submit the payment information. 5. On the button's click event, use JavaScript to send the payment information to the Stripe API for processing.  $(document).ready(function() {     var stripe = Stripe('pk_test_YOUR_PUBLISHABLE_KEY');     $('#submit-button').click(function() {         var cardNumber = $('#card-number').val();         var cardExpiry = $('#card-expiry').val();         var cardCvc = $('#card-cvc').val();         stripe.createToken(cardNumber, cardExpiry, cardCvc, function(status, response) {             if (status === 200) {                 var token = response.id;                 // Use the token to send the payment information to the server                 // where it can be sent to the

How to control Check Box in Interactive Report (Allow One Selection of check box at time similar like Radio Button in Oracle APEX)

Image
  How to control Check Box in Interactive Report (Allow One Selection of check box at time similar like Radio Button in Oracle APEX) Step 1 : Create Interactive Report with APEX_ITEM API for check box ,define p_attributes with OnlyOneChecked function while click on check box Go to Created Interactive Report ans change the setting of L_sel column (Escape Special Character off) Step 2 Your Output look like Step 3 :- Global Declaration (Define the OnlyOneChecked function). This code users JavaScript function to validate that only one check box is checked in group of check boxes. function OnlyOneChecked(pThis){ var ml = document.wwv_flow; var len = ml.elements.length; var indx; if (pThis.checked == false) pThis.checked = false; else { for (var j = 0; j < len; j++) { var e = ml.elements[j]; var e_type = e.type; if (e_type == ‘checkbox’) { e.checked = false; } } pThis.checked = true; } } step 4 (Test the Result) Multi Check box selection not allowed, only one check at time you can select.

DBMS_SCHEDULER package to send your APEX_AUTOMATION.EXECUTE to the background.

  APEX_AUTOMATION.EXECUTE :- the APEX_AUTOMATION.EXECUTE procedure executes the automation in the foreground (so you have to wait),   DBMS_SCHEDULER.CREATE_JOB :- executes the automation in the background. Objective:-   DBMS_SCHEDULER package to send your APEX_AUTOMATION.EXECUTE to the background. declare l_filters apex_exec.t_filters; l_static_id apex_appl_automations.static_id%type; l_exists number; l_application_id apex_appl_automations.application_id%type; l_job_short_name scheduled_jobs.job_short_name%type; BEGIN begin select static_id,application_id into l_static_id ,l_application_id from apex_appl_automations where AUTOMATION_ID=:P10_STATIC_ID; end; l_job_short_name:=replace(l_static_id,'-','_'); /* apex_exec.add_filter( p_filters => l_filters, p_column_name => 'DEPTNO', p_filter_type => apex_exec.c_filter_eq, p_value => 10 );

Custom alert and confirm box in APEX with help of jquery

Image
 Custom alert and confirm box in jquery  Step 1)  Define Function at Function and Global Variable Declaration  function yesnodialog(button1, button2,button3, element){   var btns = {};   btns[button1] = function(){       element.parents('li').hide();       $(this).dialog("close");   };   btns[button2] = function(){       // Do nothing       $(this).dialog("close");   };   btns[button3] = function(){       // Do nothing       $(this).dialog("close");   };     $("<div></div>").dialog({     autoOpen: true,     title: 'Condition',     modal:true,     buttons:btns   }); }    Step 2 ) Call the function wherever need by passing parameter  yesnodialog('Yes','No','Cancel',$(this));  

DBMS_CLOUD.COPY (Upload Excel/CSV Data into Table on cloud)

  1) Create Credential on Cloud  2) Login with sql developer 3) Create table in my case TVEH 4) Perform the below  procedure  begin DBMS_CLOUD.COPY_DATA(     table_name =>‘TVEH’,     credential_name =>‘DEV’,     file_uri_list =>‘ https://objectstorage.us-ashburn-1.oraclecloud.com/n/<name space name >/b/BigData/o/file_name.csv ’,     format => json_object(‘type’ value ‘CSV’,‘ignoremissingcolumns’ value ‘true’,‘rejectlimit’ value ‘100’)  );

display password column with asterisk on Interactive/Classic Report on APEX

Image
  1) Create Query  select USER_ID,        USER_NAME,        '<input type="password" value="'||PASSWORD||'" readonly="readonly"/>' PASSWORD   from USERS_TBL 2) Go to IR Region and Select the PASSWORD column property--Switch off( Escape special characters) 3) Go to CSS - inline input[type=password]{ -webkit-transition: all 0.30s ease-in-out; -moz-transition: all 0.30s ease-in-out; -ms-transition: all 0.30s ease-in-out; -o-transition: all 0.30s ease-in-out; outline: none; padding: 3px 0px 3px 3px; margin: 5px 1px 3px 0px; border: 0px solid #DDDDDD; } Out Put