Remove unwanted code/comments
This commit is contained in:
		
					parent
					
						
							
								ec13a71866
							
						
					
				
			
			
				commit
				
					
						1e67bef4f5
					
				
			
		
					 4 changed files with 7 additions and 23 deletions
				
			
		|  | @ -471,7 +471,6 @@ class PaymentOrderView(FormView): | |||
|             id_payment_method = self.request.POST.get('id_payment_method', | ||||
|                                                       None) | ||||
|             if id_payment_method == 'undefined': | ||||
|                 # Probably user chose one of the previously saved cards | ||||
|                 id_payment_method = address_form.cleaned_data.get('card') | ||||
|             request.session["id_payment_method"] = id_payment_method | ||||
|             logger.debug("id_payment_method is %s" % id_payment_method) | ||||
|  | @ -1125,8 +1124,9 @@ class OrderConfirmationView(DetailView, FormView): | |||
| 
 | ||||
| def create_incomplete_intent_request(request): | ||||
|     """ | ||||
|     Persist session variables so that they could be pick up | ||||
|     in the webhook for processing. | ||||
|     Creates a dictionary of all session variables so that they could be | ||||
|     picked up in the webhook for processing. | ||||
| 
 | ||||
|     :param request: | ||||
|     :return: | ||||
|     """ | ||||
|  | @ -1233,6 +1233,10 @@ def do_provisioning_generic( | |||
|         stripe_api_cus_id, request['id_payment_method'], | ||||
|         set_as_default=True | ||||
|     ) | ||||
|     """ | ||||
|     Identical to do_provisioning(), except for the fact that this | ||||
|     is specific to handling provisioning of the generic products | ||||
|     """ | ||||
|     logger.debug("Card %s associate result %s" % ( | ||||
|         request['id_payment_method'], | ||||
|         acc_result.get('response_object') | ||||
|  |  | |||
|  | @ -211,24 +211,6 @@ $(document).ready(function () { | |||
|               } | ||||
|           }); | ||||
|         window.card = cardNumberElement; | ||||
|         /* stripe.confirmCardPayment( | ||||
|           window.paymentIntentSecret, | ||||
|           { | ||||
|             payment_method: {card: cardNumberElement} | ||||
|           } | ||||
|         ).then(function(result) { | ||||
|             window.result = result; | ||||
|           if (result.error) { | ||||
|             // Display error.message in your UI.
 | ||||
|             var errorElement = document.getElementById('card-errors'); | ||||
|             errorElement.textContent = result.error.message; | ||||
|           } else { | ||||
|             // The payment has succeeded
 | ||||
|             // Display a success message
 | ||||
|             alert("Thanks for the order. Your product will be provisioned " + | ||||
|                 "as soon as we receive the payment. Thank you."); | ||||
|           } | ||||
|         }); */ | ||||
|     } | ||||
|     function payWithStripe_new(e) { | ||||
|         e.preventDefault(); | ||||
|  |  | |||
|  | @ -677,7 +677,6 @@ class SettingsView(LoginRequiredMixin, FormView): | |||
|                     msg = _("Billing address updated successfully") | ||||
|                     messages.add_message(request, messages.SUCCESS, msg) | ||||
|             else: | ||||
|                 # TODO : Test this flow | ||||
|                 id_payment_method = request.POST.get('id_payment_method', None) | ||||
|                 stripe_utils = StripeUtils() | ||||
|                 card_details = stripe_utils.get_cards_details_from_payment_method( | ||||
|  |  | |||
|  | @ -111,7 +111,6 @@ class StripeUtils(object): | |||
| 
 | ||||
|     @handleStripeError | ||||
|     def update_customer_card(self, customer_id, token): | ||||
|         # TODO replace token with payment intent | ||||
|         customer = stripe.Customer.retrieve(customer_id) | ||||
|         current_card_token = customer.default_source | ||||
|         customer.sources.retrieve(current_card_token).delete() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue