@@ -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 /**
0 commit comments