#qzai.

1 messages · Page 1 of 1 (latest)

sly pathBOT
teal veldt
silver raptor
#

how can i display "view More"

#

no hide it

#

maxRows Default is 0, meaning unlimited.

#

I haven't done any settings

teal veldt
#

to clarify, do you want to display view more or hide it?

silver raptor
#

hide it

#

I expect all to be shown

teal veldt
#

can you share an accessible url for us to take a closer look?

teal veldt
#

how should i get to that page you're showing?

#

this is what i see currently

silver raptor
#

wait me

#

refresh it now

teal veldt
#

getting a bad gateway now

silver raptor
#

refresh it now,

#

it is ok

#

are you ok?

teal veldt
#

can you share another url? it looks like the previous URL session expired or something

teal veldt
silver raptor
#

Or tell me how to expand and show all by default

#

hello ?

gray cipher
#

Hi @silver raptor This is Jack, I'm also an engineer from Stripe. Do you have a test account that I can use to log into your website?

gray cipher
#

Ok

#

Looks like the height of the element is 92px, any chance you can increase it?

silver raptor
#

I have not set any

gray cipher
#

Can you share with me the code you wrote to create the express checkout element?

silver raptor
#

···vue

gray cipher
silver raptor
#

<template>
<section >
<van-skeleton row-width="100%" :row="2" v-if="!showStripePayBtn" />
<div id="express-checkout-element">
<!-- Express Checkout Element will be inserted here -->
</div>
<div id="error-message" v-if="errorMsg">
{{ errorMsg }}
</div>
</section>
</template>

#

<script>
import { loadStripe } from "@stripe/stripe-js";
import NP from 'number-precision'

export default{
name:'StripCommon',
props:{
payParams:{
type:Object,
default:()=>{}
},
},
data(){
return {
showStripePayBtn:false,
elements:null,
strip:null,
errorMsg:false
}
},
mounted(){
this.initGooglePay()
},

#

methods:{
async initGooglePay(){
let publishableKey = process.env.NODE_ENV === "production"
? 'pk_live_51KeENBAcC6VsSIHxVWgJo5GGVAmbEx6kV20QLDLrsVYQ5kgfwWzI8GcoXWVlzJxXHI261EveoyeyPeXPKNchUrsg00AXq9Bpok'
: 'pk_test_51KeENBAcC6VsSIHxWZFNnJjEmwn2q7zfZqO4mVJaiP8ck8ngYNVx8GbmZyNPaoBQsiTzukEYcdARculKIGMdHZdS00EmcRiQhq'

this.stripe = await loadStripe(publishableKey);
const appearance = { /* appearance */ }
const options = {
  paymentMethodOrder:['apple_pay','google_pay'],
  wallets:{
    applePay:'always',
    googlePay:'always'
  }
}
this.elements = this.stripe.elements({
  mode: 'payment',
  amount: NP.times(this.payParams.price,100),
  currency: 'usd',
  appearance,
})
const expressCheckoutElement = this.elements.create('expressCheckout', options)
expressCheckoutElement.mount('#express-checkout-element')
//监听按钮
expressCheckoutElement.on('ready', ({availablePaymentMethods}) => {
  if (!availablePaymentMethods) {
    // No buttons will show
  } else {
    this.showStripePayBtn = true
  }
});

//监听付款
expressCheckoutElement.on('confirm',this.handleSubmit)



},

async handleSubmit() {
  const {error: submitError} = await this.elements.submit();
  if (submitError) {
    this.errorMsg = submitError.message;
    return;
  }
  const { error } = await this.stripe.confirmPayment({
    elements:this.elements,
    clientSecret:this.payParams.client_secret,
    confirmParams: {
      return_url: `${process.env.url}/pay?orderId=${this.payParams.orderId}&intentId=${this.payParams.intent_id}`,
    },
  });

  if (error) {
    this.errorMsg = error.message;
  } else {
    console.log('success')
  }


}

}
}
</script>

#

<style lang="scss" scoped>
.p-btn {
width: 100%;
height: 50px;
margin-top: 20px;
background: #9a8cff;
border-radius: 8px 8px 8px 8px;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: 16px;
cursor: pointer;
}

</style>

silver raptor
#

its ugly

#

How to make every button width 100%

gray cipher
#

I don't see an option to do that. But I'd pass along your feedback to the relevant team.

silver raptor
#

ok

#

i had resolve it

  layout:{
    overflow:'never',
    maxColumns:1
  },