Log in

hypePayments

    hypeJunction
    Premium Download

    Payments and sales API for Elgg

    Elgg 3.0

    Features

    • Standardized API for handling payments and product sales
    • Interface for logging and refunding payments

    Usage

    New payment


    namespace hypeJunction\Payments; // First, we create an itemized order/invoice $order = new Order(); $order->setCurrency('EUR'); // Add a new product $order->add($product, 2); // Add additional fees and charges $shipping = Amount::fromString('25.25', 'EUR'); $charges[] = new ShippingFee('shipping', 0, $shipping); $charges[] = new ProcessingFee('paypal_fee', 3.9); $order->setCharges($charges); $address = new Address(); $address->street_address = 'Some street 25'; // add other address parts $address->country_code = 'CZ'; $order->setShippingAddress($address); // Now create a transaction $transaction = new Transaction(); $transaction->setOrder($order); $transaction->setPaymentMethod('paypal'); // Be sure to correctly set the owner and container and access id // to ensure that both the merchant and the customer have access // to the transaction entity $transaction->owner_guid = $payer->guid; $transaction->container_guid = $payee->guid; // You can use access_grant to give access to the merchant, // or create a new acccess collection that contains both the payer and the payee $transaction->access_id = ACCESS_PRIVATE; $transaction->save(); // Instantiate a gateway of choice $gateway = new \hypeJunction\PayPal\API\Adapter(); // What you do with response may depend on where you are executing // this code. From an action file, you can just return the $response. $response = $adapter->pay($transaction);

    Package Releases

    VersionRelease Date
    hypePayments 3.2.23.2.2
    hypePayments 3.2.13.2.1
    hypePayments 3.2.03.2.0
    hypePayments 3.1.13.1.1
    hypePayments 3.1.03.1.0
    hypePayments 3.0.03.0.0

    Changelog

    3.1.1 (2018-07-07)

    Bug Fixes

    • css: extend a component instead of the main css (e3a74cd)

    3.1.0 (2018-06-29)

    Features

    3.0.0 (2018-03-19)

    Features

    • releases: upgrade for Elgg 3 (1ac8ebf)

    2.0.13 (2017-07-18)

    Bug Fixes

    • transaction: avoid WSOD when transaction amount is corrupted (588537e)

    2.0.12 (2017-06-23)

    Bug Fixes

    • logs: allow payments to be logged manually regardless of the original payment status (fad75b7)

    2.0.11 (2017-06-23)

    Bug Fixes

    • export: only store a 1000 char export of entity description (9bc682c)

    2.0.10 (2017-04-01)

    Bug Fixes

    • data: use base64 encoding to avoid data loss due to multi-byte chars and escaping (75eb97f)

    2.0.9 (2017-04-01)

    Bug Fixes

    • data: properly truncate long serialized metastrings (17e0189)
    • transactions: fixes syntax error (ddb08f5)

    2.0.8 (2017-02-27)

    Bug Fixes

    • languages: add missing language key (7b3e739)
    • transactions: fixes syntax error (ddb08f5)

    2.0.7 (2017-02-22)

    Bug Fixes

    • languages: add missing language key (7b3e739)
    • transactions: Order is now returned correctly (846a0d4)

    2.0.6 (2017-02-21)

    Bug Fixes

    • history: fix typo in costomer email (06c4aea)
    • history: provide more detailed customer information (5b4f1bd)
    • transactions: log an error when order information is corrupted (09ebc0e)
    • transactions: Order is now returned correctly (846a0d4)
    • views: validate instances before formatting output (00bf798)

    2.0.5 (2017-02-06)

    Bug Fixes

    • history: fix typo in costomer email (06c4aea)

    2.0.4 (2017-02-06)

    Bug Fixes

    • history: provide more detailed customer information (5b4f1bd)

    2.0.3 (2017-01-30)

    Bug Fixes

    • entities: correctly initialize attributes in abstract ElggObject extensions (0c21738)
    • fees: allow processor fees to be stored with the transaction (f639f2b)
    • payments: better handling of refunds and payment processor fees (9b85cb6)
    • refund: allow refund handler to return response builder (559e359)
    • transactions: log an error when order information is corrupted (09ebc0e)
    • views: validate instances before formatting output (00bf798)

    2.0.2 (2016-11-24)

    Bug Fixes

    • entities: correctly initialize attributes in abstract ElggObject extensions (0c21738)
    • fees: allow processor fees to be stored with the transaction (f639f2b)
    • payments: better handling of refunds and payment processor fees (9b85cb6)
    • refund: allow refund handler to return response builder (559e359)

    2.0.1 (2016-11-21)

    Bug Fixes

    • activate: plugin can once again be activated without causing WSOD (72cc6b1)
    • classes: fix constact name (039e4a3)

    2.0.0 (2016-11-15)

    Features

    • core: improved declarative API (a0a4654)
    • releases: upgrade to Elgg 2.3 (c21d051)

    BREAKING CHANGES

    • core: Most interface signatures have been changed. Invoking classes will need to be updated to reflect these changes.
    • releases: Now requires Elgg 2.3

    1.0.1 (2016-03-25)

    1.0.0 (2016-03-25)

    Features

    • releases: initial commit (aff1131)

    About

    Dependencies

    Requires
    Elgg version >= 3.0
    PHP extension: intl
    Plugin: hypeLists Any
    PHP extension: gmp