Skip to content

Commit

Permalink
PHP Linting (Pint) - Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi authored and github-actions[bot] committed Jul 18, 2024
1 parent 9a711f3 commit 0d530f8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
22 changes: 11 additions & 11 deletions src/Payments/PaypalExpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,17 @@ protected function getPaymentFormFields($order, $data = [])
$fields['purchase_units'][] = [
'reference_id' => $order->hash,
'custom_id' => $order->getKey(),
// 'items' => $order->getOrderMenus()->map(function(OrderMenu $orderMenu) use ($currencyCode) {
// return [
// 'name' => $orderMenu->name,
// 'quantity' => $orderMenu->quantity,
// 'unit_amount' => [
// 'currency_code' => $currencyCode,
// 'value' => number_format($orderMenu->price, 2, '.', ''),
// ],
// 'category' => 'PHYSICAL_GOODS',
// ];
// })->all(),
// 'items' => $order->getOrderMenus()->map(function(OrderMenu $orderMenu) use ($currencyCode) {
// return [
// 'name' => $orderMenu->name,
// 'quantity' => $orderMenu->quantity,
// 'unit_amount' => [
// 'currency_code' => $currencyCode,
// 'value' => number_format($orderMenu->price, 2, '.', ''),
// ],
// 'category' => 'PHYSICAL_GOODS',
// ];
// })->all(),
'amount' => [
'currency_code' => $currencyCode,
'value' => number_format($order->order_total, 2, '.', ''),
Expand Down
2 changes: 1 addition & 1 deletion src/Payments/Square.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ protected function getPaymentRefundFields($order, $data)
$fields = [
'amount' => number_format($refundAmount, 2, '', ''),
'currency' => currency()->getUserCurrency(),
'reason' => array_get($data, 'refund_reason')
'reason' => array_get($data, 'refund_reason'),
];

$eventResult = $this->fireSystemEvent('payregister.square.extendRefundFields', [$fields, $order, $data], false);
Expand Down
7 changes: 4 additions & 3 deletions src/Payments/Stripe.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function processPaymentForm($data, $host, $order)
$gateway = $this->createGateway();
$stripeOptions = $this->getStripeOptions();
$paymentIntent = $gateway->paymentIntents->retrieve($intentId, [
'expand' => ['payment_method']
'expand' => ['payment_method'],
], $stripeOptions);

// At this stage the PaymentIntent status should either
Expand All @@ -189,7 +189,7 @@ public function processPaymentForm($data, $host, $order)
'exp_month',
'exp_year',
'last4',
'three_d_secure_usage'
'three_d_secure_usage',
]),
]);
}
Expand Down Expand Up @@ -303,8 +303,9 @@ public function updatePaymentIntentSession($order)
}

$fields = $this->getPaymentFormFields($order, [], true);

return $gateway->paymentIntents->update($paymentIntent->id, array_except($fields, [
'capture_method', 'setup_future_usage', 'customer'
'capture_method', 'setup_future_usage', 'customer',
]), $stripeOptions);
}
} catch (Exception $ex) {
Expand Down

0 comments on commit 0d530f8

Please sign in to comment.