Posts

Showing posts from January, 2023

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(),   ...

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...