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
Catalan Yanick beaulieu Replied 2 years ago

Will you be able to add it or I have to integrate more precise things to install it I tried to add visa directly they did not want to provide me with the necessary information to add it to the surplus plugins to the component or as you did with paypal and stripe it will really be an even more powerful tool than it already has

Indonesian Arsalan Shah Replied 2 years ago

Is it possible to add Globalpayments and Interac?

It can be integrated with any gateway

Catalan Yanick beaulieu Replied 2 years ago

Is it possible to ask for an improvement because in real life, I love this magical plugins you made
Is it possible to add Globalpayments and Interac?

Will it be possible to add an admin control in the event that a refund can be made possibly we could rebalance the person's account, I know that it may seem like a request but is it a possible thing

Indonesian Arsalan Shah Replied 3 years ago

@James glad you got it working.

us James Maynard Replied 3 years ago

nevermind, got it working

us James Maynard Replied 3 years ago

trying to set this up, got userid and key put in, but its not working, i dunno what im doing wrong..

Indonesian Arsalan Shah Replied 3 years ago

@Zack tell me how much is 1+3 ? I doubt you are a bot

us Zack Aguilar Replied 3 years ago

This is a great feature. I was able to make it function. However, it is not allowing an input of the credit or debit card at all. The input area is not working. Please advise further. Thanks

Indonesian Arsalan Shah Replied 3 years ago

@Maurice

How to use this component is mentioned in the component description and that is for developers. You can use this component if it is required by a 3rd component example PaidAccess. Otherwise its of no use if you don't have the API and wanted to use (writing own component).

us MAURICE TAYLOR Replied 3 years ago

1 other person including myself asked a question and was ignored. Why is that when people don't understand something, we are often ignored? I thought this was a community, not an elitest club. I'm pretty sure no one came into this work knowing everything, and they had someone to answer their questions. I can understand it may not be something you want to do, state that. In the long term it hurts your product because the longer it takes for us to learn they less we spend on other components and modules being created. Also the more we learn, the more we can help others and increase the community.
Just a thought.