From 5cbb0da32f1d19111a7dba77df58918524325547 Mon Sep 17 00:00:00 2001 From: Armando Ibarra Date: Tue, 13 Sep 2022 19:41:30 -0500 Subject: [PATCH] Added amount_allocations and marked marketplace as deprecated --- lib/Checkout/Common/AmountAllocations.php | 26 +++++++++++++++++++ lib/Checkout/Common/Commission.php | 16 ++++++++++++ lib/Checkout/Payments/CaptureRequest.php | 6 +++++ .../Hosted/HostedPaymentsSessionRequest.php | 6 +++++ .../Payments/Links/PaymentLinkRequest.php | 6 +++++ .../Payments/Request/PaymentRequest.php | 6 +++++ .../Links/PaymentLinksIntegrationTest.php | 14 ++++++++++ 7 files changed, 80 insertions(+) create mode 100644 lib/Checkout/Common/AmountAllocations.php create mode 100644 lib/Checkout/Common/Commission.php diff --git a/lib/Checkout/Common/AmountAllocations.php b/lib/Checkout/Common/AmountAllocations.php new file mode 100644 index 00000000..ac60ff2d --- /dev/null +++ b/lib/Checkout/Common/AmountAllocations.php @@ -0,0 +1,26 @@ +createPaymentLinkRequest(); + $commission = new Commission(); + $commission->amount = 1; + $commission->percentage = 0.1; + + $allocations = new AmountAllocations(); + $allocations->id = "ent_sdioy6bajpzxyl3utftdp7legq"; + $allocations->amount=100; + $allocations->reference = uniqid(); + $allocations->commission = $commission; + + $request->amount_allocations = array($allocations); + $response = $this->checkoutApi->getPaymentLinksClient()->createPaymentLink($request); $this->assertResponse(