Skip to content

Commit

Permalink
feat: Add new checkout session endpoints (#23)
Browse files Browse the repository at this point in the history
Re TA-4928 updates API for use with new checkout session enhancements.
  • Loading branch information
cbetta authored Aug 8, 2023
1 parent 6e274c8 commit a896f01
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions lib/Gr4vyConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ public function deletePaymentService($payment_service_id) {
$response = $this->delete("/payment-services/" . $payment_service_id);
return $response;
}

public function authorizeNewTransaction($transaction_request) {
$response = $this->post("/transactions", $transaction_request);
return $response;
Expand All @@ -416,10 +415,20 @@ public function refundTransaction($transaction_id, $refund_request) {
$response = $this->post("/transactions/" . $transaction_id . "/refunds", $refund_request);
return $response;
}

public function newCheckoutSession($request = array()) {
$response = $this->post("/checkout/sessions", $request);
return $response;
}

public function updateCheckoutSession($request = array()) {
$response = $this->put("/checkout/sessions/" . $checkout_session_id, $request);
return $response;
}
public function updateCheckoutSessionFields($request = array()) {
$response = $this->put("/checkout/sessions/" . $checkout_session_id . "/fields", $request);
return $response;
}
public function deleteCheckoutSession() {
$response = $this->delete("/checkout/sessions/" . $checkout_session_id);
return $response;
}
}

0 comments on commit a896f01

Please sign in to comment.