Skip to content

Commit 2480a2b

Browse files
Fixed TNW-316: some issues with request processing (#2)
Co-authored-by: Artur Petrov <50198911+arturpetrov13@users.noreply.github.com>
1 parent 3a26f7d commit 2480a2b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Gateway/Http/Client/TransactionSale.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TransactionSale extends AbstractTransaction
2828
protected function process(array $data)
2929
{
3030
try {
31-
$storeId = $data['store_id'] ? $data['store_id'] : null;
31+
$storeId = isset($data['store_id']) ? $data['store_id'] : null;
3232
// sending store id and other additional keys are restricted by Stripe API
3333
unset($data['store_id']);
3434
unset($data['shipping']);

Gateway/Http/Client/TransactionVoid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TransactionVoid extends AbstractTransaction
2525
*/
2626
protected function process(array $data)
2727
{
28-
$storeId = $data['store_id'] ? $data['store_id'] : null;
28+
$storeId = isset($data['store_id']) ? $data['store_id'] : null;
2929
// sending store id and other additional keys are restricted by Stripe API
3030
unset($data['store_id']);
3131

Model/Adapter/StripeAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function capture($transactionId, $amount = null)
113113
public function void($transactionId)
114114
{
115115
return PaymentIntent::retrieve($transactionId)
116-
->refund();
116+
->cancel();
117117
}
118118

119119
/**

0 commit comments

Comments
 (0)