import rave from "rave-simple";
const rave = Rave();
rave.addOptions({
PBFPubKey: 'PBFPubKey-xxxx-xxxx',
customer_email: 'mail@example.com',
customer_phone: '0810987655432',
amount: 150000,
txref: `REF-${(Math.random() * 10000).toFixed()}`,
callback: () => {
r.close();
},
});
rave.pay();
import rave from "rave-simple";
const rave = Rave({ test: true });
rave.addOptions({
PBFPubKey: 'PBFPubKey-xxxx-xxxx',
customer_email: 'mail@example.com',
customer_phone: '0810987655432',
amount: 150000,
txref: `REF-${(Math.random() * 10000).toFixed()}`,
callback: () => {
r.close();
},
});
rave.pay();
import Rave, { setGlobalConfig } from "rave-simple";
setGlobalConfig({ PBFPubKey: 'PBFPubKey-xxxx-xxxx' })
const paymentInstance = Rave();
paymentInstance.addOptions({
amount: 5000,
customer_email: 'mail@example.com',
customer_phone: '0810987655432',
callback: (res) => {
paymentInstance.close()
}
})
paymentInstance.pay()