Any product purchase add credit to the wallet, then the wallet is never charged

Created on 8 August 2023, 11 months ago
Updated 1 November 2023, 8 months ago

I am not sure If I am not configuring something properly, but the behavior sounds weird.

1. I have created some products, on all those products I have enabled the Funds balance checkout.
2. I made a deposit using Paypal sandbox and manual payment.
3. I checked if my balance increased, and indeed it did.
4. I bought a product using the fund method, spending 4 $. The purchase went through, and I got this message

Your order number is 6.
You can view your order on your account page when logged in.
4.00 USD have been added to your account balance. Your order number is 6.
You can view your order on your account page when logged in.

I think the problem is here "4.00 USD have been added to your account balance".
Why my balance is supposed to be increased?

5) At the end the balance was still 100 $ and I guess because it has been charged of 4$ and then 4$ has been added.

Any idea?

💬 Support request
Status

Closed: works as designed

Version

2.1

Component

Code

Created by

🇮🇹Italy christiansicari

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @christiansicari
  • 🇭🇷Croatia Aporie

    This sounds like you haven't removed the "Deposit completion message" from the default checkout flow. It's only a message and should not credit or debit the balance from anything. Just make sure to disable this pane from your payment workflow.

    Regarding the balance not being debited, if you're using the funds method as payment gateway, it should normally work. What it does is debit the user bying the product and transfer the funds to the admin balance (user 1). If you were trying to buy the product with user 1 then this might result in a "transparent" transaction.

    What do you have in your transaction history? Does the transaction happen?

  • 🇮🇹Italy christiansicari

    Sorry You were right, I have fallen in a transparent transaction.

  • I have the same situation but under different circumstances:
    I managed to install the following modules:
    Commerce license
    Commerce License Content and its submodule Commerce License Publish Content
    which gives me the ability to charge users for a license to post ads (in this case an article as a content type) that is limited in time.
    When Commerce funds is used as a payment method, a transaction is made(in commerce/funds/view-transactions the transaction from user to user is completed), but in such a way that it removes the price from the buyer and returns the same amount to the buyer's wallet, probably because the author of the article is the buyer or the owner of the purchased license is the buyer.
    In the case when a regular Commerce product created by another user is purchased, everything works as intended, the user's balance is reduced by the amount of the product's price, and the product creator's balance is increased.
    Please, if possible, some advice and guidelines where it is possible to make a modification to redirect all transactions to e.g. store owner or user 1 account. Thank you.

  • 🇭🇷Croatia Aporie

    @drupal.rs,

    You're right, the default behavior is actually to credit the author of the product.

    If you want to redirect all transactions to admin user 1, you might want to patch or implement your own payment gateway similarly from this file: commerce_funds/src/Plugin/Commerce/PaymentGateway/BalanceGateway.php

  • Status changed to Closed: works as designed 8 months ago
  • 🇭🇷Croatia Aporie
Production build 0.69.0 2024