Skip to content

Commit 47ce4d1

Browse files
PLGMAG2V2-401 (#360)
* FastCheckout2 * Change to public dev 16 * PLGMAG2V2-401: Add method to get CheckoutOptions from the OrderRequest object (#299) * PLGMAG2V2-520: Add default tax rule * Add support for feed URL * Revert changes on URL * Remove default rule * Update TaxTable.php * Update Client.php --------- Co-authored-by: Vinod MultiSafepay <[email protected]> Co-authored-by: Vinod Sowdagar <[email protected]>
1 parent bee10c4 commit 47ce4d1

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/Api/Transactions/OrderRequest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class OrderRequest extends RequestBody implements OrderRequestInterface
3737
public const DIRECT_TYPE = 'direct';
3838
public const REDIRECT_TYPE = 'redirect';
3939
public const PAYMENT_LINK_TYPE = 'paymentlink';
40-
public const ALLOWED_TYPES = [self::DIRECT_TYPE, self::REDIRECT_TYPE, self::PAYMENT_LINK_TYPE];
40+
public const CHECKOUT_TYPE = 'checkout';
41+
public const ALLOWED_TYPES = [self::DIRECT_TYPE, self::REDIRECT_TYPE, self::PAYMENT_LINK_TYPE, self::CHECKOUT_TYPE];
4142

4243
/** The allowed values for the recurring models. */
4344
public const CARD_ON_FILE_MODEL = 'cardOnFile';

src/Api/Transactions/OrderRequest/Arguments/PaymentOptions.php

+24
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class PaymentOptions
2020
*/
2121
private $notificationUrl = '';
2222

23+
/**
24+
* @var string
25+
*/
26+
private $feedUrl = '';
27+
2328
/**
2429
* @var array
2530
*/
@@ -80,6 +85,16 @@ public function addNotificationMethod(string $notificationMethod = 'POST'): Paym
8085
return $this;
8186
}
8287

88+
/**
89+
* @param string $feedUrl
90+
* @return PaymentOptions
91+
*/
92+
public function addFeedUrl(string $feedUrl): PaymentOptions
93+
{
94+
$this->feedUrl = $feedUrl;
95+
return $this;
96+
}
97+
8398
/**
8499
* @param string $redirectUrl
85100
* @return PaymentOptions
@@ -118,6 +133,14 @@ public function getNotificationUrl(): string
118133
return $this->notificationUrl;
119134
}
120135

136+
/**
137+
* @return string
138+
*/
139+
public function getFeedUrl(): string
140+
{
141+
return $this->feedUrl;
142+
}
143+
121144
/**
122145
* @return string
123146
*/
@@ -165,6 +188,7 @@ public function getData(): array
165188
{
166189
return [
167190
'notification_url' => $this->getNotificationUrl(),
191+
'feed_url' => $this->getFeedUrl(),
168192
'notification_method' => $this->getNotificationMethod(),
169193
'redirect_url' => $this->getRedirectUrl(),
170194
'cancel_url' => $this->getCancelUrl(),

0 commit comments

Comments
 (0)