Wallet Download 3.0

This component/theme works with latest OSSN version.
5.0
Indonesian Arsalan Shah 3 years 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.8

  • Translation of card fields.

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
us John Robertson Replied 9 months ago

cash app api would be nice

il Roman Abramovich Replied 9 months ago

Can you add other options for working with credit cards besides Stripe?

Indonesian Arsalan Shah Replied 9 months ago

You need to use a gateway like stripe or paypal to process any cards. You can not process any cards without any gateway.

Catalan Yanick beaulieu Replied 9 months 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 9 months ago

Is it possible to add Globalpayments and Interac?

It can be integrated with any gateway

Catalan Yanick beaulieu Replied 10 months 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 1 year ago

@James glad you got it working.

us James Maynard Replied 1 year ago

nevermind, got it working

us James Maynard Replied 1 year 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 2 years ago

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

Component

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

Versions