2017 © Pedro Peláez
 

library liqpay-api

LiqPay API

image

and/liqpay-api

LiqPay API

  • Saturday, October 12, 2013
  • by And
  • Repository
  • 2 Watchers
  • 2 Stars
  • 1,363 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

LiqPay API extension with Packagist compatibiluty

try
        {
            $api = $this->getAPI();
            $xml = $api->getPaymentForCallback($request->request->all());

            switch ($xml->status)
            {
                case 'success':
                    $this->updateInvoice($xml->order_id, InvoiceDetail::STATUS_PAID);
                    break;

                case 'wait_secure':
                    $this->updateInvoice($xml->order_id, InvoiceDetail::STATUS_PROCESSING);
                    break;

                default:
                    $this->updateInvoice($xml->order_id, InvoiceDetail::STATUS_FAILURE);
            }

        } catch (\ErrorException $e)
        {
            /** @noinspection PhpUndefinedVariableInspection */
            $xml = $api->lastXml;
            switch ($e->getCode())
            {
                case API::ERROR_BAD_REQUEST:
                    throw new NotFoundHttpException();

                case API::ERROR_SIGNATURE_MISMATCH:
                    if ($xml->order_id)
                    {
                        $this->getLogger()->warn('Signature mismatch for OrderDetail#id ' . $xml->order_id);
                    }
                    throw new BadRequestHttpException($e->getMessage());

                default:
                    throw $e;
            }
        }
$fields = $this->getAPI()->getFieldsForPayment(
    100,
    API::CURRENCY_USD,
    $redirect,
    $callback,
    $orderDetail->getId(),
    'Perevod polzovately "' . $orderDetail->getUserToPay()->getEmail() . '" ot polzovatelya "' . $orderDetail->getInvoice()->getUser()->getEmail() . '"',
    API::PAYWAY_LIQPAY | API::PAYWAY_CARD
)
$api->sendToPhone('ORDER_1', '380661234567', '10', 'UAH', 'Payment description');
$balance = $api->viewBalance();

Based on https://github.com/4you4ever/yii-liqpay, (*1)

The Versions

12/10 2013

dev-master

9999999-dev

LiqPay API

  Sources   Download

GPL-3.0

The Requires

  • php >=5.3.3
  • lib-libxml >=2.7.0

 

by Avatar And

payment liqpay