PHPackages                             fond-of-oryx/gift-card-proportional-value-payone-connector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fond-of-oryx/gift-card-proportional-value-payone-connector

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fond-of-oryx/gift-card-proportional-value-payone-connector
==========================================================

GiftCardProportionalValuePayoneConnector module.

2.0.1(3y ago)013.0kMITPHPPHP &gt;=8.0CI failing

Since Jun 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/fond-of-oryx/gift-card-proportional-value-payone-connector)[ Packagist](https://packagist.org/packages/fond-of-oryx/gift-card-proportional-value-payone-connector)[ RSS](/packages/fond-of-oryx-gift-card-proportional-value-payone-connector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

Gift Card Proportional Value Payone Connector Module
====================================================

[](#gift-card-proportional-value-payone-connector-module)

[![CI](https://github.com/fond-of-oryx/gift-card-proportional-value-payone-connector/actions/workflows/main.yml/badge.svg)](https://github.com/fond-of-oryx/gift-card-proportional-value-payone-connector/actions/workflows/main.yml)[![license](https://camo.githubusercontent.com/c150bf3ff3bd2d276c70be2b7370132e3561150c64a6d9f0addcd70518e671c3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f666f6e642d6f662d6f7279782f676966742d636172642d70726f706f7274696f6e616c2d76616c75652d7061796f6e652d636f6e6e6563746f722e737667)](https://packagist.org/packages/fond-of-oryx/gift-card-proportional-value-payone-connector)

In our case, we need the proportional gift card values for every item in order, if a gift card was redeemed. For orders paid with payone and redeemed gift card, the `spryker-eco/payone` split the gift card amount proportional to the item amounts. For example you made an order with three items, each item has a total price of 39,90 Euro and you use a 20 Euro gift card. The amount of 20 Euro will be split by 33,3333333%. One proportional amount will be 6,66 Euro and two times 6,67 Euro. Another example you buy two items, one item 10 Euro and one item 30 Euro and you use a 20 Euro gift card. The proportional amount for this would be 5 Euro for the 10 Euro item and 15 Euro for the 30 Euro item.

For this, we use the calculation from the spryker-eco/payone package but had to create a fork () and make the calculation accessible from outside. A PR is also open ([spryker-eco/payone#81](https://github.com/spryker-eco/payone/pull/81)) and we hope they will accept it soon. At the moment, this package requires the fork!

This package provides a calculation plugin for the `fond-of-oryx/gift-card-proportional-value`.

Installation
------------

[](#installation)

```
...
"repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/fond-of/payone"
    }
  ],
  "require": {
    ...
    "spryker-eco/payone": "dev-master-fondof as 4.4.2",
    ...
   },
   ...
...

composer require fond-of-oryx/gift-card-proportional-value-payone-connector

```

Configuration
-------------

[](#configuration)

```
