Skip to content

Commit 0b36447

Browse files
authored
Create Authorize and Place API Endpoint (#262)
* Insert new line after opening PHP tag * Remove new line before closing class brace * Create logic for authorizing and placing order (META-182) - Retrieves authorized payments from Bold Checkout API - Converts existing Magento Quote to an Order * Fix incorrect identifier used to load test quote (META-182) * Add missing return type declaration to closure (META-182) * Fix incorrect total amount set in order payment (META-182) * Use masked ID to load quote instead of entity ID (META-182) * Fix incorrect handling of errors returned by Bold API (META-182) * Update error response annotations to match API (META-182) Original annotations were modeled off of an incorrect example in the specification. * Handle edge case when error code is not returned by API (META-182) * Update response data annotations to match API (META-182) Original annotations were modeled off of an incorrect example in the specification. * Handle blank status code when filtering transactions (META-182) * Replace `gateway_id` field with `payment_id` field (META-182) * Remove `response_code` field from payment data (META-182) * Refactor Web API test into integration test (META-182) Magento's API testing framework is broken to the point that it will override your existing environment, even if configured to run in a sandbox. * Fix incorrect structure of data returned from API (META-182) * Set base amount paid for order payment (META-182) * Mark payment transaction for order as closed (META-182) * Add credit card details to order payment (META-182) * Remove `reference_transaction_id` field from test data (META-182) * Add missing `transaction_id` fields to test data (META-182) * Add quote and order data to Checkout Session (META-182) * Use correct status code for failed payments (META-182) See documentation here: https://developer.boldcommerce.com/api/orders#tag/Payments/operation/CapturePaymentForArbitraryAmount
1 parent 235ac77 commit 0b36447

File tree

6 files changed

+669
-2
lines changed

6 files changed

+669
-2
lines changed

Api/PlaceOrderInterface.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Bold\Checkout\Api;
@@ -21,4 +22,11 @@ interface PlaceOrderInterface
2122
* @return \Bold\Checkout\Api\Data\PlaceOrder\ResultInterface
2223
*/
2324
public function place(string $shopId, OrderDataInterface $order): ResultInterface;
25+
26+
/**
27+
* @param string $shopId
28+
* @param string $quoteMaskId
29+
* @return ResultInterface
30+
*/
31+
public function authorizeAndPlace(string $publicOrderId, string $quoteMaskId): ResultInterface;
2432
}

0 commit comments

Comments
 (0)