apuspayments / client
ApusPayments is a plataform to make payments using criptocurrencies.
1.0.1
2018-10-04 04:04 UTC
Requires
- php: >=7.1
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: 7.3.*
This package is not auto-updated.
Last update: 2024-11-09 09:50:52 UTC
README
ApusPayments is a plataform to make payments using criptocurrencies.
- Language: PHP
Examples of use
- Payments by card
- Recurring payments
- Cancel payment
- Consult payments
- Cryptocurrency recharge
Getting Started
Install using Composer.
$ composer require apuspayments/client
Payments by card
$apusPaymentsAPI = new ApusPaymentsAPI(Environment::sandbox()); $makePayment = new MakePayment(); $makePayment->setAmount(10.00); $makePayment->setBlockchain(BlockChainType::LTC); $makePayment->setCurrency(CurrencyType::BRL); $makePayment->setPan("9999999999999999"); $makePayment->setPassword("1234"); $makePayment->setVendorKey("5f5bdaed-f82b-4b82-b3f5-1d562633da5b"); $makePaymentResponse = $apusPaymentsAPI->makePayment($makePayment);
Recurring payments
$apusPaymentsAPI = new ApusPaymentsAPI(Environment::sandbox()); $makeRecurringPayment = new MakeRecurringPayment(); $makeRecurringPayment->setAmount(10.00); $makeRecurringPayment->setBlockchain(BlockChainType::LTC); $makeRecurringPayment->setCurrency(CurrencyType::BRL); $makeRecurringPayment->setPeriod(PeriodType::M); $makeRecurringPayment->setFrequency(12); $makeRecurringPayment->setExecute(true); $makeRecurringPayment->setPan("9999999999999999"); $makeRecurringPayment->setPassword("1234"); $makeRecurringPayment->setVendorKey("5f5bdaed-f82b-4b82-b3f5-1d562633da5b"); $makeRecurringPaymentResponse = $apusPaymentsAPI->makeRecurringPayment($makePayment);
Cancel payment
$apusPaymentsAPI = new ApusPaymentsAPI(Environment::sandbox()); $cancelPayment = new CancelPayment(); $cancelPayment->setTxId("2bf779e2a311c2629df977b0bb105879411fd71f5839972c4ed1d3278f80170f"); $cancelPayment->setPassword("1234"); $cancelPayment->setVendorKey("5f5bdaed-f82b-4b82-b3f5-1d562633da5b"); $cancelPaymentResponse = $apusPaymentsAPI->cancelPayment($cancelPayment);
Consult payments
$apusPaymentsAPI = new ApusPaymentsAPI(Environment::sandbox()); $searchPayment = new SearchPayment(); $searchPayment->setVendorKey("5f5bdaed-f82b-4b82-b3f5-1d562633da5b"); $searchPaymentResponse = $apusPaymentsAPI->searchPayment($searchPayment);
Cryptocurrency recharge
$apusPaymentsAPI = new ApusPaymentsAPI(Environment::sandbox()); $rechargeCryptoBalance = new RechargeCryptoBalance(); $rechargeCryptoBalance->setAmount(10.00); $rechargeCryptoBalance->setBlockchain(BlockChainType::LTC); $rechargeCryptoBalance->setCurrency(CurrencyType::BRL); $rechargeCryptoBalance->setPan("9999999999999999"); $rechargeCryptoBalance->setPassword("1234"); $rechargeCryptoBalance->setVendorKey("5f5bdaed-f82b-4b82-b3f5-1d562633da5b"); $rechargeCryptoBalanceResponse = $apusPaymentsAPI->rechargeCryptoBalance($rechargeCryptoBalance);