private PaymentSetupRequest buildPaymentRequest(View view) { Log.Verbose(TAG, "buildPaymentRequest()"); PaymentSetupRequest paymentRequest = new PaymentSetupRequest(); String amountValueString = ((EditText)view.FindViewById(Resource.Id.orderAmountEntry)).Text.ToString(); String amountCurrencyString = ((EditText)view.FindViewById(Resource.Id.orderCurrencyEntry)).Text.ToString(); paymentRequest.setAmount(new Amount(AmountUtil.ParseMajorAmount(amountCurrencyString, amountValueString), amountCurrencyString)); paymentRequest.setCountryCode(((EditText)view.FindViewById(Resource.Id.countryEntry)).Text.ToString()); paymentRequest.setShopperLocale(((EditText)view.FindViewById(Resource.Id.shopperLocaleEntry)).Text.ToString()); paymentRequest.setMerchantAccount(((EditText)view.FindViewById(Resource.Id.merchantAccountEntry)).Text.ToString()); String maxNumberOfInstallments = ((String)((Spinner)view.FindViewById(Resource.Id.installmentsEntry)).SelectedItem); paymentRequest.setMaxNumberOfInstallments(maxNumberOfInstallments); return(paymentRequest); }
private PaymentSetupRequest buildPaymentRequest(View view) { Log.Verbose(TAG, "buildPaymentRequest()"); PaymentSetupRequest paymentRequest = new PaymentSetupRequest(); String amountValueString = ((EditText)view.FindViewById(Resource.Id.orderAmountEntry)).Text.ToString(); String amountCurrencyString = ((EditText)view.FindViewById(Resource.Id.orderCurrencyEntry)).Text.ToString(); paymentRequest.setAmount(new Amount(AmountUtil.ParseMajorAmount(amountCurrencyString, amountValueString), amountCurrencyString)); paymentRequest.setCountryCode(((EditText)view.FindViewById(Resource.Id.countryEntry)).Text.ToString()); paymentRequest.setShopperLocale(((EditText)view.FindViewById(Resource.Id.shopperLocaleEntry)).Text.ToString()); paymentRequest.setShopperIP(((EditText)view.FindViewById(Resource.Id.shopperIpEntry)).Text.ToString()); paymentRequest.setMerchantAccount(((EditText)view.FindViewById(Resource.Id.merchantAccountEntry)).Text.ToString()); paymentRequest.setMerchantReference(((EditText)view.FindViewById(Resource.Id.merchantReferenceEntry)).Text.ToString()); paymentRequest.setPaymentDeadline(((EditText)view.FindViewById(Resource.Id.paymentDeadlineEntry)).Text.ToString()); paymentRequest.setReturnURL(((EditText)view.FindViewById(Resource.Id.returnUrlEntry)).Text.ToString()); return(paymentRequest); }