Confirmed users
483
edits
| Line 415: | Line 415: | ||
=== B2G Glue part in Gecko === | === B2G Glue part in Gecko === | ||
Contains the specific B2G code that triggers the trusted UI creation to embed the payment flow iframe and that injects the required <code>paymentSuccess()</code> and <code>paymentFailed()</code> functions within the payment flow content. | Contains the specific B2G code that triggers the trusted UI creation to embed the payment flow iframe and that injects the required <code>paymentSuccess()</code> and <code>paymentFailed()</code> functions within the payment flow content. | ||
It implements the nsIPaymentUIGlue interface | |||
<code> | |||
interface nsIPaymentUIGlueCallback | |||
{ | |||
void onresult(in DOMString result); | |||
}; | |||
interface nsIPaymentUIGlue | |||
{ | |||
// The 'paymentRequestsInfo' contains the payment request information | |||
// for each JWT provided via navigator.mozPay call. | |||
void confirmPaymentRequest(in jsval paymentRequestsInfo, | |||
in nsIPaymentUIGlueCallback successCb, | |||
in nsIPaymentUIGlueCallback errorCb); | |||
void showPaymentFlow(in nsIPaymentFlowInfo paymentFlowInfo, | |||
in nsIPaymentUIGlueCallback errorCb); | |||
}; | |||
</code> | |||
=== Gaia part === | === Gaia part === | ||
Contains the require code to create, open and close the trusted UI and the payment confirmation screen. | Contains the require code to create, open and close the trusted UI and the payment confirmation screen. | ||