fix(payment): compile shipped payment components
This commit is contained in:
1 parent
10771f1a2b
commit
c578bc0f92
7 files changed
+27
-7
No files matched your search
@@ -532,7 +532,7 @@
|
|||||||
},
|
},
|
||||||
"packages/payment": {
|
"packages/payment": {
|
||||||
"name": "@wrnexus/payment",
|
"name": "@wrnexus/payment",
|
||||||
"version": "0.8.2",
|
"version": "0.8.3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@wrnexus/db": "workspace:*",
|
"@wrnexus/db": "workspace:*",
|
||||||
"@wrnexus/plugin": "workspace:*",
|
"@wrnexus/plugin": "workspace:*",
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
component PayNow {
|
component PayNow {
|
||||||
props { checkoutUrl: string label?: string = "Pay now" disabled?: boolean = false }
|
props {
|
||||||
|
checkoutUrl: string
|
||||||
|
label?: string = "Pay now"
|
||||||
|
disabled?: boolean = false
|
||||||
|
}
|
||||||
view {
|
view {
|
||||||
<a class="wrn-payment-button" href={checkoutUrl} aria-disabled={disabled}>
|
<a class="wrn-payment-button" href={checkoutUrl} aria-disabled={disabled}>
|
||||||
{label}
|
{label}
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
component PaymentSheet {
|
component PaymentSheet {
|
||||||
props { checkoutUrl: string gateway: string }
|
props {
|
||||||
|
checkoutUrl: string
|
||||||
|
gateway: string
|
||||||
|
}
|
||||||
view { <section class="wrn-payment-sheet" data-gateway={gateway}><p>Secure payment is completed on the payment provider.</p><a href={checkoutUrl}>Continue securely</a></section> }
|
view { <section class="wrn-payment-sheet" data-gateway={gateway}><p>Secure payment is completed on the payment provider.</p><a href={checkoutUrl}>Continue securely</a></section> }
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
component PaymentStatus {
|
component PaymentStatus {
|
||||||
props { status: string label?: string = "Payment status" }
|
props {
|
||||||
|
status: string
|
||||||
|
label?: string = "Payment status"
|
||||||
|
}
|
||||||
view { <div class="wrn-payment-status" role="status"><strong>{label}</strong><span>{status}</span></div> }
|
view { <div class="wrn-payment-status" role="status"><strong>{label}</strong><span>{status}</span></div> }
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
component PaymentSummary {
|
component PaymentSummary {
|
||||||
props { captured: number = 0 refunded: number = 0 net: number = 0 currency: string }
|
props {
|
||||||
|
captured: number = 0
|
||||||
|
refunded: number = 0
|
||||||
|
net: number = 0
|
||||||
|
currency: string
|
||||||
|
}
|
||||||
view { <dl><dt>Captured</dt><dd>{currency} {captured}</dd><dt>Refunded</dt><dd>{currency} {refunded}</dd><dt>Net</dt><dd>{currency} {net}</dd></dl> }
|
view { <dl><dt>Captured</dt><dd>{currency} {captured}</dd><dt>Refunded</dt><dd>{currency} {refunded}</dd><dt>Net</dt><dd>{currency} {net}</dd></dl> }
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
component RefundButton {
|
component RefundButton {
|
||||||
props { paymentId: string refundable: number partial?: boolean = false action?: string = "/api/payments/refund" }
|
props {
|
||||||
|
paymentId: string
|
||||||
|
refundable: number
|
||||||
|
partial?: boolean = false
|
||||||
|
action?: string = "/api/payments/refund"
|
||||||
|
}
|
||||||
view { <form method="post" action={action}><input type="hidden" name="paymentId" value={paymentId} /><label>Reason<input name="reason" required /></label>{#if partial}<label>Amount<input name="amount" type="number" min="1" max={refundable} /></label>{/if}<button type="submit">Refund</button></form> }
|
view { <form method="post" action={action}><input type="hidden" name="paymentId" value={paymentId} /><label>Reason<input name="reason" required /></label>{#if partial}<label>Amount<input name="amount" type="number" min="1" max={refundable} /></label>{/if}<button type="submit">Refund</button></form> }
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@wrnexus/payment",
|
"name": "@wrnexus/payment",
|
||||||
"version": "0.8.2",
|
"version": "0.8.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
|
|||||||
Reference in new issue
Block a user