2017 © Pedro Peláez
 

package bpaypaymentapi

api bpay md

image

vovamaliti/bpaypaymentapi

api bpay md

  • Monday, July 30, 2018
  • by vovamaliti
  • Repository
  • 2 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

bpay/bpay-md-payment-api - library for integration with Bpay.md api

Library allows you to carry: out billing for payment from the website of the online store,  receiving and automatically processing a payment notice (CALLBACK),  making payments from your account bpay.md,  request transaction information,  account statement., (*1)

Installation

Install the latest version with, (*2)

$ composer require bpay/bpay-md-payment-api

Basic Usage

<?php
use Bpay\Payment\Check\Check;
use Bpay\Payment\Payment;
use Bpay\Payment\PaymentHistory\PaymentHistory;
use Bpay\Payment\Transaction\Transaction;



//check
$check = new Check();
$check->setType('1.2');
$check->setMerchantId('merchantId');
$check->setAmount('0.1');
$check->setDescription('some description');
$check->setMethod('bpay');
$check->setOrderId('admin@admin.com');
$check->setSuccessUrl('http://yourdomain.com');
$check->setFailUrl('https://yourdomain.com');
$check->setCallbackUrl('http://yourdomain.com');
$check->setLang('ru');
$check->setAdvanced1('221B Baker Street');
$check->setAdvanced2('');
$check->setIsTest('1'); //0 - real payment, 1 - test payment
$data = $check->serialize();

$payment = new Payment();
$result = $payment->check('https://www.bpay.md/user-api/payment1', $data, 'h42kd20d');

//callback
$payment1 = new Payment();
$data = 'DQogICAgICAgIDxwYXltZW50Pg0K3r3r3rICAgICAgICAJPHR5cGU+MS490ZXN0Pg0KICAgICAgICA8L3BheW1lbnQ+
';

$key = '0cb795b89fd49c82a233r3t3t3t34d01c0ce76785d';
$result = $payment1->getCheckInfo($key,$data, 'g5g3g3fg6');

//transaction 

$transaction = new Transaction();
$transaction->setLogin('yourlogin');
$transaction->setPassword('yourpassword');
$transaction->setTransId('1111111'); //or
$transaction->setReceipt('21445124124214214');

$transactionData = $transaction->serialize();

$payment1 = new Payment();
$result = $payment1->getTransactionInfo('https://www.bpay.md/user-api/checkstate1', $transactionData);

//payment history
$paymentHistory  = new PaymentHistory();
$paymentHistory->setLogin('yourlogin');
$paymentHistory->setPassword('yourpassword');
$paymentHistory->setAccount('1111111');
$paymentHistory->setDateStart('2018-06-12 ');
$paymentHistory->setDateEnd('2018-06-15 ');
$paymentHistory->setState('30');
$paymentHistory->setService('');
$paymentHistory->setDateType('');


$paymentHistoryResult = $paymentHistory->serialize();
$payment3 = new Payment();
$result  = $payment3->getPaymentHistory('https://www.bpay.md/user-api/getpaymentshistory',$paymentHistoryResult);

//transfer
$transfer = new \Bpay\Payment\Transfer\Transfer();
$transfer->setLogin('');
$transfer->setPassword('admin@admin.com');
$transfer->setTime();
$transfer->setPayerAccount('123425916');
$transfer->setAccount('2343451241');
$transfer->setAmount('1');
$transfer->setDescription('test payment');
$transfer->setTxnId(rand(1,1000));
$transfer->setTest('1');
$transfer->setSign('');

$transfer->serialize();

$paymentTransfer = new  Payment();
$paymentTransfer->transfer('https://www.bpay.md/user-api/transfer',$transfer,'key');



Third Party Packages

Guzzle, PHP HTTP client , Array2XML conversion library , (*3)

About

Requirements

  • bpay/bpay-md-payment-api works with PHP 5.6>

Authors

Petrovschii Vladimir - petrovschii.vladimir@gmail.com VR Dev Team - tv@vr-dev.team, (*4)

License

bpay/bpay-md-payment-api is licensed under the MIT License, (*5)

The Versions

30/07 2018

dev-master

9999999-dev

api bpay md

  Sources   Download

MIT

The Requires

 

The Development Requires

by Petrovschii Vladimir
by VR Dev Team

api payment bpay bpay-md

26/07 2018

dev-modify_set_language

dev-modify_set_language

api bpay md

  Sources   Download

MIT

The Requires

 

The Development Requires

by Petrovschii Vladimir
by VR Dev Team

api payment bpay bpay-md

20/06 2018

dev-response-classes

dev-response-classes

api bpay md

  Sources   Download

MIT

The Requires

 

The Development Requires

by Petrovschii Vladimir
by VR Dev Team

api payment bpay bpay-md

18/06 2018

dev-remove-serialization

dev-remove-serialization

api bpay md

  Sources   Download

MIT

The Requires

 

The Development Requires

by Petrovschii Vladimir
by VR Dev Team

api payment bpay bpay-md

18/06 2018

1.0

1.0.0.0

api bpay md

  Sources   Download

MIT

The Requires

 

The Development Requires

by Petrovschii Vladimir
by VR Dev Team

api payment bpay bpay-md