Integrate rave flutterwave api in php

4.2k Views Asked by At

hello I am using core PHP in client Project, I need to integrate rave flutter wave API, I have searched a lot of links now I am checking this URL here but not getting a good result, so please help me in rave flutter wave "Nigeria payment gateway" API in PHP

2

There are 2 best solutions below

0
Gondy On BEST ANSWER

Our Product for collections is called Rave, please follow the steps below to get started:

  1. Sign up https://ravepay.co/ , for a sanbox account sign up on http://rave.frontendpwc.com

  2. Add a settlement account on sign up

  3. Select a settlement preference by navigating to Account settings > Settlement preference (Find documentation attached for more detailed instruction).

  4. Documentation for developers: https://flutterwavedevelopers.readme.io/v1.0

Pay Now
document.addEventListener("DOMContentLoaded", function(event) {
    document.getElementById("submit").addEventListener("click", function() {
     
    var chargeResponse = "",
        trxref = "FDKHGK" + Math.random(),// add your transaction ref here
        pubkey = "XXXX"; // Add public keys generated on your dashboard here
      getpaidSetup({
        customer_email: "xxxxx",// 
        amount: 1000,
        currency: "NGN",
        country: "NG",
        custom_logo: "http://imgur.com/uuRnkV9",
        custom_description:"",
        custom_title: "The Start",
        txref: trxref,
        PBFPubKey: pubkey,
        onclose: function(response) {},
        callback: function(response) {
          //flw_ref = response.tx.flwRef;
          console.log("This is the response returned after a charge", response);
          if(response.tx.chargeResponse =='00' || response.tx.chargeResponse == '0') {
            // redirect to a success page
          } else {
            // redirect to a failure page.
          }
        }
      });
    });
  });

If you have any issues at any point, please let us know and we will help sort you out.

0
Pianistprogrammer On

If you are here in 2020, the docs for the payment gateway has been updated, you can check how to integrate this with laravel seamlessly using this link https://questionbump.com/question/how-can-i-setup-flutterwave-payment-webhook-successfully-on-laravel-5/ I hope it helps someone. I struggled to get this working.