vue2接入paypal支付

泠风lj發表於2024-03-09

paypal支付,官網

vue2接入paypal支付 vue2接入paypal支付vue2接入paypal支付

例項

引入cdn

在載入該元件時就讀取指令碼

data() {
    return {
      clientId:'AbJmdo6IqMHBMfgJVP-qWfFacVBBDOE45hOJGp8_XpZ1uq4ytOzOPDX4jw2p0pUTPmNptRA40BEqgdXf', // paypal客戶端id
    };
 },
mounted() {
    this.initScript()
  },
methods: {
    // 載入paypal指令碼
    initScript(){
      const setLoaded = ()=>{
      // console.log('初始化--載入script')
      }
      // 在頁面中建立script標籤
      const script = document.createElement("script");
      // 給script標籤加src 連結到paypal
      // script.src = "https://www.paypal.com/sdk/js?client-id=YOU_CLIENT_id";
      // 測試連線  沙盒
      // script.src = "https://www.paypal.com/sdk/js?client-id=test&components=buttons,marks";
      script.src = `https://www.paypal.com/sdk/js?client-id=${this.clientId}`;
      script.addEventListener("load", setLoaded);
      document.body.appendChild(script);
    }
}

渲染生成元素元件

透過監聽變化,再初始化渲染元件

<div ref="paypalBtnBox"></div>
watch: {
    visible: {
      handler(val, oldVal) {
        this.popupStatus = val;
        if (val) {
          this.paypalResultStatus = false;
          if (window.paypal) {
            // console.log("已載入---");
            let _this = this;
            this.$nextTick(() => {
              _this.initPaypal(_this);
            });
          } else {
            // console.log("未載入---");
          }
        }
      },
      deep: true,
      immediate: true,
    },
},
methods: {
    // 初始化paypal元件
    async initPaypal(_this) {
      _this.$refs.paypalBtnBox.innerHTML = ''; // 清空元素內容
      window.paypal
        .Buttons({
          style: {
            layout: 'vertical',//按鈕樣式
            color: 'gold',//顏色
            shape: 'pill',//
            label: 'checkout',//按鈕文字
            tagline: false //
          },
          // locale: 'zh_CN',//按鈕的語言
          async createOrder() {
            // 建立
            try {
              //建立訂單xgemBuyPaypal
              const response = await xgemBuyPaypal(_this.paypalOrder)
                .then((resp) => {
                  _this.paypalRespond = resp?.data;
                  // console.log("--paypal---resp", _this.paypalRespond);
                  return _this.paypalRespond;
                })
                .catch((err) => {
                  _this.$notice.error(err);
                  return Promise.reject(err);
                });
              const orderData = await response;
              if (orderData?.payPalOrderId) {
                return orderData?.payPalOrderId;
              } else {
                const errorDetail = orderData?.details?.[0];
                const errorMessage = errorDetail
                  ? `${errorDetail.issue} ${errorDetail.description} (${orderData.debug_id})`
                  : JSON.stringify(orderData);
                throw new Error(errorMessage);
              }
            } catch (err) {
              _this.$notice.error(err);
            }
          },
          async onApprove(data, actions) {
            // 使用者支付回撥
            await actions.order.capture()
                  .then((details) => {
                    // 支付成功
                    let orderNumber,orderAmount;
                    // 訂單id
                    orderNumber = details.id;
                    //訂單支付的金額
                    orderAmount = details.purchase_units[0].amount.value;
                    _this.goResultPage(true)
                    // console.log('支付成功---1-',details, orderNumber,orderAmount);
                  }).catch((err)=>{
                    //支付失敗
                    _this.goResultPage(false)
                    // console.log('支付失敗----',err)
                  });
            _this.paypalApprove(_this,data,actions)

          },
          onCancel: function(data) {
            // 在付款取消時執行的操作
            // console.log('在付款取消時執行的操作---',data)
          },
          onClick: function(data) {
            // 在點選支付按鈕時執行的操作
            // console.log('在點選支付按鈕時執行的操作---',data)
          },

        })
        .render(_this.$refs.paypalBtnBox);
    },
}
 

完整程式碼

引用

<PaypalPop 
           :visible="PaypalPopupStatus" 
           :paypal-order="paypalOrderParams" 
           @closeEvent="showPaypalPopEvent" 
           @success="paymentSuccess">
</PaypalPop>

PaypalPop.vue

檢視程式碼
 <template>
  <div>
    <Popup
      class="popup-paypal"
      :closeable="paypalResultStatus?false:true"
      v-model="popupStatus"
      get-container="body"
      :close-on-click-overlay="false"
      :position="bottomOrCenter"
      @click.stop
      @close="handleClose(1)"
    >
      <div class="paypal-button-container-box" v-if="!paypalResultStatus">
        <div ref="paypalBtnBox"></div>
      </div>
      <PaypalResult v-else :atype="paypalResultType" @closeEvent="handleClose(2)"></PaypalResult>
    </Popup>
  </div>
</template>

<script>
import { reportOrderNFTPaypal } from "@/api/http.account";
import { xgemBuyPaypal } from "@/api/nft/http.nft";
import { Popup } from "vant";
import PaypalResult from "@/components/PaypalResult.vue";
export default {
  name: "Paypal",
  components: {
    Popup,
    PaypalResult,
  },
  props: {
    paypalOrder: Object,
    visible: Boolean,
  },
  // paypalOrder
  data() {
    return {
      popupStatus: this.visible,
      paypalRespond: null, // paypal建立訂單後的回撥
      reportOrder: null, // 上報的訂單
      bottomOrCenter: "bottom",
      paypalResultStatus: false, // 是否顯示結果
      paypalResultType: false, // 結果狀態
      clientId:'AbJmdo6IqMHBMfgJVP-qWfFacVBBDOE45hOJGp8_XpZ1uq4ytOzOPDX4jw2p0pUTPmNptRA40BEqgdXf', // paypal客戶端id
    };
  },
  watch: {
    visible: {
      handler(val, oldVal) {
        this.popupStatus = val;
        if (val) {
          this.paypalResultStatus = false;
          if (window.paypal) {
            // console.log("已載入---");
            let _this = this;
            this.$nextTick(() => {
              _this.initPaypal(_this);
            });
          } else {
            this.$notice.error(this.$t('fomo.FOMO_EGAIN'));
            // console.log("未載入---");
          }
        }
      },
      deep: true,
      immediate: true,
    },
  },
  created() {
  },
  mounted() {
    this.initScript()
  },
  methods: {
    //關閉當前彈窗,val:1為右上角的關閉 2為結果頁的關閉
    handleClose(val) {
      this.popupStatus = false;
      this.$emit("closeEvent", val); //傳送給子類 自定義方法
      return;
    },
    // 透過是判斷paypal支付結果
    // this.goResultPage(true)  this.goResultPage(false);
    goResultPage(_type) {
      this.paypalResultStatus = true;
      this.paypalResultType = _type;
    },
    // paypal結果上報
    async paypalReport(_this) {
      //上報介面引數
      const paramsReport = {
        id: _this.paypalRespond?.id, // 外部支付訂單ID
        payPalOrderId: _this.paypalRespond?.payPalOrderId, // PayPal Order ID
        result: _this.paypalResultType?1:2, // 支付結果:1-成功;2-取消
      };
      // console.log("上報的引數---", paramsReport);
      await reportOrderNFTPaypal(paramsReport)
        .then((resp) => {
          // console.log("上報結果--", resp);
          _this.reportOrder = resp?.data;
          _this.handleClose(2)
          _this.$emit('success');
          return _this.reportOrder;
        })
        .catch((err) => {
          //  this.$notice.error(_this.$t('order_paypal_Report_fail',{var1:'Paypal'}));
           this.$notice.error(_this.$t('account.order_payment_wait'));
        });
    },
    // 初始化paypal元件
    async initPaypal(_this) {
      _this.$refs.paypalBtnBox.innerHTML = ''; // 清空元素內容
      window.paypal
        .Buttons({
          style: {
            layout: 'vertical',//按鈕樣式
            color: 'gold',//顏色
            shape: 'pill',//
            label: 'checkout',//按鈕文字
            tagline: false //
          },
          // locale: 'zh_CN',//按鈕的語言
          async createOrder() {
            // 建立
            try {
              //建立訂單xgemBuyPaypal
              const response = await xgemBuyPaypal(_this.paypalOrder)
                .then((resp) => {
                  _this.paypalRespond = resp?.data;
                  // console.log("--paypal---resp", _this.paypalRespond);
                  return _this.paypalRespond;
                })
                .catch((err) => {
                  _this.$notice.error(err);
                  return Promise.reject(err);
                });
              const orderData = await response;
              if (orderData?.payPalOrderId) {
                return orderData?.payPalOrderId;
              } else {
                const errorDetail = orderData?.details?.[0];
                const errorMessage = errorDetail
                  ? `${errorDetail.issue} ${errorDetail.description} (${orderData.debug_id})`
                  : JSON.stringify(orderData);
                throw new Error(errorMessage);
              }
            } catch (err) {
              _this.$notice.error(err);
            }
          },
          async onApprove(data, actions) {
            // 使用者支付回撥
            await actions.order.capture()
                  .then((details) => {
                    // 支付成功
                    let orderNumber,orderAmount;
                    // 訂單id
                    orderNumber = details.id;
                    //訂單支付的金額
                    orderAmount = details.purchase_units[0].amount.value;
                    _this.goResultPage(true)
                    // console.log('支付成功---1-',details, orderNumber,orderAmount);
                  }).catch((err)=>{
                    //支付失敗
                    _this.goResultPage(false)
                    // console.log('支付失敗----',err)
                  });
            _this.paypalApprove(_this,data,actions)

          },
          onCancel: function(data) {
            // 在付款取消時執行的操作
            // console.log('在付款取消時執行的操作---',data)
          },
          onClick: function(data) {
            // 在點選支付按鈕時執行的操作
            // console.log('在點選支付按鈕時執行的操作---',data)
          },

        })
        .render(_this.$refs.paypalBtnBox);
    },
    // paypal支付狀態回撥
    async paypalApprove(_this,data,actions){
      // console.log("paypal回撥---", data, "-----", actions);
            try {
              const response = _this.paypalReport(_this);
              const orderData = await response;
            } catch (error) {
              console.error(error);
            }
    },
    // 載入paypal指令碼
    initScript(){
      const setLoaded = ()=>{
      // console.log('初始化--載入script')
      }
      // 在頁面中建立script標籤
      const script = document.createElement("script");
      // 給script標籤加src 連結到paypal
      // script.src = "https://www.paypal.com/sdk/js?client-id=YOU_CLIENT_id";
      // 測試連線  沙盒
      // script.src = "https://www.paypal.com/sdk/js?client-id=test&components=buttons,marks";
      script.src = `https://www.paypal.com/sdk/js?client-id=${this.clientId}`;
      script.addEventListener("load", setLoaded);
      document.body.appendChild(script);
    }
  },
};
</script>
<style lang="scss" scoped >
.popup-paypal{
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px 0;
}
.paypal-button-container-box{
  width: 70%;
}
</style>

PaypalResult.vue

檢視程式碼
 <template>
  <div>
    <div style="font-size: 20px; margin:60px 20px; text-align: center;">  
        <img v-if="showBtn" style="width:46px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAETCAMAAADAqwnzAAAAqFBMVEUAAABp3c1h1Mlp3s1p3s1p3c1m38xo3c1l28pp3c1n4tJp3c1p3s1p3c1o3cxp3s1p3c1p3s5p3c1p3c1p3c1p3c1p3c1p3s1o3c1p3s1p3s1p3c1o3c1p3c1p3c1p3c1p3c1p3c1p3c1p3c1p3c1p3c1p3c1p3c1p3c1p3c1p3c1p3s1p3c1p3c1o3s5p3c1p3s5p3c1p3c1p3c1p3c1p3c1p3s1p3c3EvHZQAAAAN3RSTlMA+gP27vILDwgUBurg3Bgc0Ce3pWfkVtg4XOe8K4Gsnz5hM7F0yntD1JluIMFQI8ZIi5SGTI8vWthmjQAAGXVJREFUeNrkXNliqkgQpVllR0BEWWRHFETB5f//bGJm7kwm091gorG9cx7yFBWKOrWcqoZ6Dmh+mxzjrO9Wodkaa1VRluwbFEWdG7mXWt2hsJtoKtLU/wCSuEvKJt4U/amyUrPOrwZZyizLcswbOJaVl7O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SfAyupKZ78Gplpst6ng5bVzbo5dJ4U3pK7rjo3j5J5QtHZs6pj9EhBtvcSff2hUJIlg9PjNuJBLqWFo2t0a3gmb4+Uw2m4Zs29Adq+pwX4beIO7AbnbBftdUNutyewvQx4JZFOYiM0Gp52cbFnjs2RfV/fycwYgpvGi3jB/q7rKrqJsBlDsROoSh5kUPzsXwYsdB5up87Ze5iTTDVKeW4Ni9hoghwy7viz5f41AIevMCyBkr4AzhHBDlugsP1RiiVPEdGpNkHnKpWj+qYMxAD5qTqaOuIlEgRBRo3UW7Ss/N/qiY6FhNgmccTpf3MX7yg/I7iF0dpX25NwEG9uili5r/nOp8RV+E3q2OaqxM7bRZAvHPVl9VoDIE38f5q0Bn6AHtb0uWqu88imN44FslZnkeGll6r9pKBw17XTnHK97/5PFjQFT8aPQKWLT0CnCI1s+EN77Sbqhxae8u7h/ixZfERWeqP7dVnZtoHNwnGFUQt1dS1clvCz+XXp8RSHWJsqSrrm3xdK2suPA1AzD0HVKqX670Mwgtqs2LXa503Rhdm8zfvaYMQqR+OUhS6TGqXNvJwhFmhaCsNt59U2H5Hop3X9DhwdAVBRZ5nlyQ/0OucPLsqz8nR7yn7+BLxIIYpH4av1IAAAAAElFTkSuQmCC" />
        <p style="font-size:20px;color:#3F3F3F;">{{showBtn?'Success':'Failed'}}</p>
        <ButtonAsync class="btn-hollow" :async="closeWindow"> {{ $t("common.message_done") }}</ButtonAsync>
    </div>
  </div>
</template>  
  
<script>
import ButtonAsync from "@/components/ButtonAsync";
export default {
  name: "PaypalResult",
  components: {
    ButtonAsync,
  },
  props: {
    atype: Boolean,
  },
  data() {
    return {
      showBtn: false,// 成功失敗
    };
  },
  watch: {
    atype: {
      handler(val, oldVal) {
        this.showBtn = val;
      },
      deep: true,
      immediate: true,
    },
  },
  created() {
    
  },
  async mounted() {
  },
  methods: {
    closeWindow(){
      this.showBtn = false;
      this.$emit("closeEvent", this.showBtn); //傳送給子類 自定義方法
      return Promise.resolve();
    },
  },
};
</script>
<style lang="scss" scoped >
.btn-base{
  margin-top: 20px;
  width: 100%;
}
</style>

參考vue3接入paypal

https://perper.top/700/.html

相關文章