Wallet Download 9.6

This component/theme works with latest OSSN version.
5.0
Indonesian Arsalan Shah 4 years ago

A general-purpose wallet system for users, allowing them to add balance to their account. The site administrator can utilize the user's wallet balance through a set of available APIs.

  • Supported Payment Method: PayPal/Stripe/Iyzipay
  • Minimum Deposit: The minimum allowed deposit is 10.
  • Currency: The default currency is USD (editable in ossn_com.php).
  • Amount Format: Amount example 10, 20, 10.5, 5.50 etc

🔐 Seamless Payments (Stripe Only)

Wallet now supports seamless payments, allowing users to securely save their card for future charges. This feature is only available when Stripe is configured as the payment gateway. The card is blocked after 3 failed attempts and admin need to delete card before user can add same card or new card. Make sure you disable Stripe Link integration https://support.stripe.com/questions/how-to-turn-off-link

📧 Transaction Notifications

Users receive email notifications for every credit or debit transaction, including both successful and failed attempts.

⚙️ Configuration Constants

Tax collection is possible in settings only if you have configured to card stripe, and configured tax in stripe.

define('WALLET_CURRENCY_CODE', 'USD');         // Your 3-letter currency code (e.g., USD)
define('WALLET_MINIMUM_LOAD', 10);             // Minimum wallet load (integer only)
define('WALLET_SEAMLESS_CHARGE', 1);           // Minimum charge to store card for seamless payments

API ENDPOINTS

➖ Debit

CURL https://www.yourwebsite.com/api/v1.0/wallet/debit

➕ Credit

CURL https://www.yourwebsite.com/api/v1.0/wallet/credit

📥 Parameters & Responses

Parameter Type Description Required
api_key_token string Your API token Yes
guid integer User GUID Yes
amount float/integer Amount to debit or credit Yes
description string Transaction description Yes

✅ Sample JSON Response

{
  "merchant": "Open Source Social Network",
  "url": "https:\/\/yourwebsite.com\/",
  "time_token": 1637513403,
  "payload": {
    "status": "success",
    "amount": "50",
    "guid": "1"
  },
  "code": "100",
  "message": "Request successfully executed"
}

🧩 Access Using PHP

<?php
// Credit wallet
try {
    $user_guid = ossn_loggedin_user()->guid;
    $wallet = new Wallet\Wallet($user_guid);
    $amount = 20;
    $description = 'Some description';
    var_dump($wallet->credit($amount, $description));
} catch (Wallet\NoUserException $e) {
    echo $e->getMessage();
} catch (Wallet\CreditException $e) {
    echo $e->getMessage();
}

// Debit wallet
try {
    $user_guid = ossn_loggedin_user()->guid;
    $wallet = new Wallet\Wallet($user_guid);
    $amount = 20;
    $description = 'Some description';
    var_dump($wallet->debit($amount, $description));
} catch (Wallet\NoUserException $e) {
    echo $e->getMessage();
} catch (Wallet\DebitException $e) {
    echo $e->getMessage();
}

// Get wallet balance
$user_guid = ossn_loggedin_user()->guid;
$wallet = new Wallet\Wallet($user_guid);
echo $wallet->getBalance();

// Set new balance
$user_guid = ossn_loggedin_user()->guid;
$wallet = new Wallet\Wallet($user_guid);
echo $wallet->setBalance(<new amount>);

9.0

  • Updated API
  • Allow you to configure tax compliance if using card stripe

4.0

  • Allow seamless payments so if wallet balance is insufficient it charge card automatically if saved.

Image

Comments
Indonesian Arsalan Shah Replied 1 month ago

9.6 added support to accept floats by Stripe Gateway

Indonesian Arsalan Shah Replied 1 month ago

9.5 added french and german

Indonesian Arsalan Shah Replied 4 months ago

Membership Tier compomnent https://www.openteknik.com/product/view/45991/membership-tier-management
If tier is expired (renew is not possible / user card is declined for recurring payments access is blocked user become non paid member) its all automatic.

Interlingue Colin Turner Replied 4 months ago

Hello Arsalan, I am creating a premium-only network with OSSN. That is, there's no free access and no tiers. It costs $20 a year to be a member. Can this software handle this case? ie. No tiers, and expired memberships blocked access to the site?

Indonesian Arsalan Shah Replied 9 months ago

There are 500+ payment gateways and wallets i can not put all in here. 🤣🤣🤣🤣🤣

Dutch Eric redegeld Replied 9 months ago

Tip, europe is changing to https://wero-wallet.eu/merchants

us Mizhack Aguilar Replied 1 year ago

It's eflymoney.com
I just created a new discussion

Indonesian Arsalan Shah Replied 1 year ago

What is your website url?

Create new discussion instead https://www.opensource-socialnetwork.org/discussion/add

us Mizhack Aguilar Replied 1 year ago

Okay. I did go to Github and reported the issue. Thanks.

us Mizhack Aguilar Replied 1 year ago

This is the admin page.
enter image description here