Skip to content

Commit

Permalink
paymenttokens page cleanup (#196)
Browse files Browse the repository at this point in the history
* make lineItemType a dropdown field

* remove old applepay page and rename convertTokens to paymenttokens
  • Loading branch information
elizalucas authored Mar 15, 2022
1 parent 29bfc63 commit 5cdcde2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 67 deletions.
25 changes: 4 additions & 21 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</v-list-item>

<v-list-item
v-for="(item, i) in allPaymentLinks"
v-for="(item, i) in paymentsLinks"
:key="`paymentlink-${i}`"
:to="item.to"
router
Expand Down Expand Up @@ -204,15 +204,12 @@
<script lang="ts">
import { Vue, Component } from 'nuxt-property-decorator'
import { getIsStaging, getIsLocalHost } from '@/lib/apiTarget'
import { getIsSafari } from '@/lib/navigatorInfo'
@Component
export default class DefaultLayoutsClass extends Vue {
isStaging: boolean = getIsStaging()
isLocalHost: boolean = getIsLocalHost()
isSafari: boolean = getIsSafari()
flowLinks = [
{
title: 'Charge a card',
Expand Down Expand Up @@ -429,18 +426,11 @@ export default class DefaultLayoutsClass extends Vue {
to: '/debug/payments/balances/fetch',
},
{
title: 'POST /convertToken',
to: '/debug/payments/digitalWallets/convertToken',
title: 'POST /paymenttokens',
to: '/debug/payments/digitalWallets/paymenttokens',
},
]
applePayStaging = {
title: 'Apple Pay',
to: '/debug/payments/applepay/create',
}
paymentsLinksWithApplePay = this.paymentsLinks.concat(this.applePayStaging)
marketplaceLinks = [
{
title: 'GET /marketplace/merchants',
Expand Down Expand Up @@ -643,15 +633,8 @@ export default class DefaultLayoutsClass extends Vue {
showRightDrawer = false
showDrawer = false
get allPaymentLinks() {
if (this.isSafari && (this.isStaging || this.isLocalHost)) {
return this.paymentsLinksWithApplePay
}
return this.paymentsLinks
}
get title() {
const navItems = this.flowLinks.concat(this.allPaymentLinks)
const navItems = this.flowLinks.concat(this.paymentsLinks)
const currentPage = navItems.find((item) => {
return item.to === this.$route.path
})
Expand Down
45 changes: 0 additions & 45 deletions pages/debug/payments/applepay/create.vue

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
v-model="applePayFormData.shopName"
label="Shop Name"
/>
<v-text-field
<v-select
v-if="displayApplePayForm"
v-model="applePayFormData.lineItemType"
:items="lineItemTypeApplePay"
label="Line Item Type"
/>
<v-text-field v-model="formData.amount" label="Amount" />
Expand Down Expand Up @@ -190,6 +191,7 @@ export default class ConvertToken extends Vue {
paymentType = ['Google Pay', 'Apple Pay']
merchantTypeApplePay = ['PayFac', 'Partnership']
merchantTypeGooglePay = ['PayFac']
lineItemTypeApplePay = ['final', 'pending']
error = {}
loading = false
showError = false
Expand Down

0 comments on commit 5cdcde2

Please sign in to comment.