Skip to content

Commit 0cc8da5

Browse files
committed
Clean up
1 parent 6ebb66d commit 0cc8da5

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

src/Action/CaptureAction.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,6 @@ public function execute($request) {
4444
$this->gateway->execute($obtainNonce);
4545

4646
if (!$model->offsetExists('status')) {
47-
if (false) {
48-
// Create transaction
49-
$transactionResult = $model['stripeElementsGateway']->transaction()->sale([
50-
'amount' => $model['amount'],
51-
'paymentMethodNonce' => $model['nonce'],
52-
//'deviceData' => $deviceDataFromTheClient,
53-
'options' => [
54-
'submitForSettlement' => true
55-
]
56-
]);
57-
if ($transactionResult->success) {
58-
// Report successful
59-
$model['status'] = 'success';
60-
} else {
61-
// Report error
62-
$model['status'] = 'failed';
63-
$model['error'] = 'failed';
64-
}
65-
$model['transactionReference'] = $transactionResult->transaction->id;
66-
$model['result'] = $transactionResult->transaction;
67-
}
68-
//$paymentIntent = $model['stripeElementsGateway']->paymentIntents->retrieve($model['nonce']);
6947
$stripe = new \Stripe\StripeClient($this->config['secret_key']);
7048
$paymentIntent = $stripe->paymentIntents->retrieve($model['nonce'], []);
7149
if ($paymentIntent->status == \Stripe\PaymentIntent::STATUS_SUCCEEDED) {
@@ -79,9 +57,7 @@ public function execute($request) {
7957
$model['transactionReference'] = $charge->id;
8058
$model['result'] = $charge;
8159
}
82-
dump(__LINE__, $model);
8360
}
84-
dump($this, get_defined_vars());
8561
}
8662

8763
/**

src/Resources/views/Action/obtain_nonce.html.twig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ var payWithCard = function(stripe, card, clientSecret) {
9696
showError(result.error.message);
9797
} else {
9898
// The payment succeeded!
99-
console.log(result)
10099
orderComplete(result.paymentIntent.id);
101100
}
102101
});

0 commit comments

Comments
 (0)