Wallet Download 2.4

This component/theme works with latest OSSN version.
5.0
Indonesian Arsalan Shah 1 year ago

A general wallet for users that they can charge. Site admin can utilize that wallet balance using set of available APIs. PayPal is the method available to load the wallet. Minimum amount is set is 10 and default current is USD. You may can edit these details in ossn_com.php file. The wallet only supports the amounts for credit that are not in floating. However the debit support two decimal places floating amount. (X.nn) not (X.nnnn)

define('WALLET_CURRENCY_CODE', 'USD'); //your 3 digits currency code from PayPal
define('WALLET_MINIMUM_LOAD', 10);  //Minimum amount integer only (no floating)

API END POINTS

Debit

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

Credit

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

Responses and parameter required
https://github.com/opensource-socialnetwork/Wallet#responces-and-parameter-required

 {
    "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
....
....
try {
    $user_guid = ossn_loggedin_user()->guid;
    $wallet = new Wallet\Wallet($user_guid);
    $amount = 20;
    $description = 'Some description';
    var_dump($wallet->credit($amount, $description)); //credit amount
} catch (Wallet\NoUserException $e) {
    echo $e->getMessage();
}  catch (Wallet\CreditException $e) {
    echo $e->getMessage();
}

//debit

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

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

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

..
Wallet
..
2.4

  • Customer details sent to Stripe

2.0

  • Support Credit/Debit card payments.

1.1

  • Allow floating (only two decimal places) for debit example 0.12 (not 0.123)
Comments
Indonesian Arsalan Shah Replied 3 weeks ago

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

us Zack Aguilar Replied 3 weeks 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 weeks 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 weeks 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.

ng Bubu Ambush Replied 2 months ago

This is amazing. Sincerely, OSSN has improved upon its functionality, Buddy press doesn't even compete

us MAURICE TAYLOR Replied 5 months ago

I apologize I want to ensure i fully understand the use of this component. Is this for charging members or business specifically for ads. ?

us Kamuden 07 Replied 6 months ago

I've added the Client ID and securty secret with the PayPal box checked, but it keeps on comingup with a error enter image description here

Indonesian Arsalan Shah Replied 8 months ago

You need to contact Stripe.com to obtain the keys and PayPal.com for PayPal section.

Hungarian Tamás Varga Replied 8 months ago

What exactly data should be entered? unfortunately i don't understand what the lines mean.

enter image description here

Indonesian Arsalan Shah Replied 1 year ago

Sorry due to error it was struck in private mode now its public.

Component

Developer: Arsalan
License ossnv4
Type: Tools
Requires Ossn Version : 6.1
Latest Version: 2.4
Last Updated 3 months ago
Repository Url View Repository

Versions