mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
* Added select-payment-method.component in shared lib Because we're going to be implementing the same functionality for providers and orgs/users, I wanted to start moving some of this shared functionality into libs so it can be accessed in both web and bit-web. Additionally, the Stripe and Braintree functionality has been moved into their own services for more central management. * Added generalized manage-tax-information component to shared lib * Added generalized add-account-credit-dialog component to shared libs * Added generalized verify-bank-account component to shared libs * Added dialog for selection of provider payment method * Added provider-payment-method component * Added provider-payment-method component to provider layout
56 lines
2.5 KiB
HTML
56 lines
2.5 KiB
HTML
<form [formGroup]="formGroup" [bitSubmit]="submit">
|
|
<bit-dialog [title]="'addCredit' | i18n">
|
|
<ng-container bitDialogContent>
|
|
<p bitTypography="body1">{{ "creditDelayed" | i18n }}</p>
|
|
<div class="tw-grid tw-grid-cols-2">
|
|
<bit-radio-group formControlName="paymentMethod">
|
|
<bit-radio-button [value]="paymentMethodType.PayPal">
|
|
<bit-label> <i class="bwi bwi-paypal"></i>{{ "payPal" | i18n }}</bit-label>
|
|
</bit-radio-button>
|
|
<bit-radio-button [value]="paymentMethodType.BitPay">
|
|
<bit-label> <i class="bwi bwi-bitcoin"></i>{{ "bitcoin" | i18n }}</bit-label>
|
|
</bit-radio-button>
|
|
</bit-radio-group>
|
|
</div>
|
|
<div class="tw-grid tw-grid-cols-2">
|
|
<bit-form-field>
|
|
<bit-label>{{ "amount" | i18n }}</bit-label>
|
|
<input bitInput type="number" formControlName="creditAmount" step="0.01" required />
|
|
<span bitPrefix>$USD</span>
|
|
</bit-form-field>
|
|
</div>
|
|
</ng-container>
|
|
<ng-container bitDialogFooter>
|
|
<button type="submit" bitButton bitFormButton buttonType="primary">
|
|
{{ "submit" | i18n }}
|
|
</button>
|
|
<button
|
|
type="button"
|
|
bitButton
|
|
bitFormButton
|
|
buttonType="secondary"
|
|
[bitDialogClose]="ResultType.Closed"
|
|
>
|
|
{{ "cancel" | i18n }}
|
|
</button>
|
|
</ng-container>
|
|
</bit-dialog>
|
|
</form>
|
|
<form #payPalForm action="{{ payPalConfig.buttonAction }}" method="post" target="_top">
|
|
<input type="hidden" name="cmd" value="_xclick" />
|
|
<input type="hidden" name="business" value="{{ payPalConfig.businessId }}" />
|
|
<input type="hidden" name="button_subtype" value="services" />
|
|
<input type="hidden" name="no_note" value="1" />
|
|
<input type="hidden" name="no_shipping" value="1" />
|
|
<input type="hidden" name="rm" value="1" />
|
|
<input type="hidden" name="return" value="{{ payPalConfig.returnUrl }}" />
|
|
<input type="hidden" name="cancel_return" value="{{ payPalConfig.returnUrl }}" />
|
|
<input type="hidden" name="currency_code" value="USD" />
|
|
<input type="hidden" name="image_url" value="https://bitwarden.com/images/paypal-banner.png" />
|
|
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHosted" />
|
|
<input type="hidden" name="amount" value="{{ formGroup.get('creditAmount').value }}" />
|
|
<input type="hidden" name="custom" value="{{ payPalConfig.customField }}" />
|
|
<input type="hidden" name="item_name" value="Bitwarden Account Credit" />
|
|
<input type="hidden" name="item_number" value="{{ payPalConfig.subject }}" />
|
|
</form>
|