cocoastorm / vue-paypal-checkout

A simple Vue.js wrapper component for paypal-checkout
MIT License
153 stars 67 forks source link

Local don't change on updated hook #45

Open Sabe67 opened 6 years ago

Sabe67 commented 6 years ago

Hello,

I have a problem with the local prop. When I try to change it when the hook updated is called nothing happend. I try the same thing with the amount prop and it's work.

Their is my paypal button :

<PayPal
        :amount="total"
        currency="EUR"
        :locale="paypalLocale"
        :client="credentials"
        :button-style="paypalStyle"
        env="sandbox"
        v-on:payment-completed="paymentCompleted">
</PayPal>

My data :

data () {
    return {
      paypalLocale: ''
   }
}

And my updated hook :

updated: function(){
    if(this.$store.state.lang == "fr"){
      this.paypalLocale = "fr_FR"
    } else {
      this.paypalLocale = "en_US"
    }
},

Thank you for your help and sorry for my english :)

cocoastorm commented 6 years ago

Hey @Sabe67,

Thanks for reporting this. I'll need to look into this.

Sabe67 commented 5 years ago

Hi @khoanguyen96,

Do you think you will work on this soon ?