Using Wallet Balance Payment Method
First read more about Wallet Balance Payment Method to learn about the wallet balance payment method.
To use wallet balance payment method, it should be enabled on our admin panels as per your request. Contact your VONQ Partner Account Manager to get it enabled. Once it is enabled, the paymentMethodsAvailable
array of orderJourney
state submodule will have wallet
option and the end user will see "Wallet" in the "Select a payment method" dropdown in "Payment Method" step of the order journey.
Disabling wallet balance method in some use cases
If the wallet is enabled globally in our admin panels however you want to disable wallet method for certain business use cases then you can read Payment Methods Configuration.
Setting wallet as the payment method for a campaign order
By default, the paymentMethod
option in campaignForm
object of campaign
state submodule is null
as we don't want to make an opinion on user's behalf by preselecting the wallet method.
If user does not have a "contract only" basket, in which case, we enforce "ATS Managed" option, you can specify this payment method as the selected payment method for your end user. To do that you would set paymentMethod
property of campaignForm
object of campaign
state submodule.
//use the enum instead of hardcoded string
const selectedPaymentMethod = window.hapi.orderJourney.utils.paymentMethodKeys.wallet
window.hapi.campaign.state.campaignForm = {
...window.hapi.campaign.state.campaignForm.value, //notice the .value
paymentMethod: selectedPaymentMethod
}
It is also required to pass a walletId
when ordering a campaign but this is automatically handled by HAPI Elements.
There is no way to overwrite walletId
and even if there was, our backend does not allow using someone else's wallet for ordering campaigns.