feat: paypal支付
This commit is contained in:
26
src/components/payment/paypal-button.vue
Normal file
26
src/components/payment/paypal-button.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue';
|
||||
import { constructPaypalBtn } from '@/utils/paypal';
|
||||
|
||||
interface Props {
|
||||
orderInfo: {
|
||||
orderId: string;
|
||||
orderType: number; // 0: 购买套餐, 1: 余额充值
|
||||
orderAmount: number;
|
||||
};
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
onMounted(async()=>{
|
||||
await constructPaypalBtn(props.orderInfo.orderId, "USD");
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="paypal-buttons"></div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user