src/nodejs/jspayments

Payments API.

Warning: Experimental JavaScript API, we hope browsers support it soon, untested because is not widely used at the time of writing it.

Types

PaymentRequest = ref object of JsRoot
  shippingAddress*: JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/shippingAddress
  shippingOption*: JsObject  ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/shippingOption
  
https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API
PaymentResponse = ref object of JsRoot
  details*: JsObject         ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse/details
  methodName*: cstring       ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse/methodName
  payerEmail*: cstring       ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse/payerEmail
  payerName*: cstring        ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse/payerName
  payerPhone*: cstring       ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse/payerPhone
  requestId*: cstring        ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse/requestId
  shippingAddress*: JsObject ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse/shippingAddress
  shippingOption*: JsObject  ## https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/shippingOption
  
https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse

Procs

func canMakePayment(self: PaymentRequest): Future[bool] {.importjs: "#.$1()",
    ...raises: [], tags: [].}
https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/canMakePayment
func complete(self: PaymentRequest | PaymentResponse): Future[void] {.
    importjs: "#.$1()", ...raises: [], tags: [].}
https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse/complete
func complete(self: PaymentRequest | PaymentResponse; results: cstring): Future[
    void] {.importjs: "#.$1(#)", ...raises: [], tags: [].}
https://developer.mozilla.org/en-US/docs/Web/API/PaymentResponse/complete
func newPaymentRequest(methodData, details, options: JsObject): PaymentRequest {.
    importjs: "new PaymentRequest(#, #, #)", ...raises: [], tags: [].}
https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API
func newPaymentRequest(methodData, details: JsObject): PaymentRequest {.
    importjs: "new PaymentRequest(#, #)", ...raises: [], tags: [].}
https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API
func show(self: PaymentRequest): Future[PaymentResponse] {.importjs: "#.$1()",
    ...raises: [], tags: [].}
https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/show