Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paymenttokens page cleanup #196

Merged
merged 2 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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