Closed Bug 947860 Opened 6 years ago Closed 6 years ago

Expose data SIM information instead of first SIM in the WebPaymentProvider API


(Core :: DOM: Device Interfaces, defect)

Gonk (Firefox OS)
Not set



blocking-b2g 1.3+
Tracking Status
firefox27 --- wontfix
firefox28 --- fixed
firefox29 --- fixed
b2g-v1.3 --- fixed


(Reporter: ferjm, Assigned: ferjm)




(1 file)

The latest agreement is to use the data SIM for payments.

Bug 947432 is going to add an indication in the Settings app about the data SIM being used for payments. Unfortunately, this is not accurate enough. We cannot assure that the data SIM is the one that is going to be used for payments and there are some cases where the information shown in settings won't be true. If another SIM is used by the payment provider during the payment flow, there won't be any change in Settings that lets the user know about another SIM being used for payments. Bug 938993 will try to provide a better solution that allow us to show the correct information to the user in any case. But this won't happen until 1.4.

In the meantime, as we are adding this information to settings, we can at least expose the data SIM instead of the one in the first slot, so we don't lie that much to the user. The payment provider *will try* to use this SIM for payments by default.
Attached patch v1Splinter Review
Unfortunately, I cannot test this patch properly cause I don't have a DSDS device. Payments in a single-SIM device works well with this patch.
Assignee: nobody → ferjmoreno
Attachment #8344560 - Flags: review?(fabrice)
One clarification, I would only take this patch iif bug 947432 lands in 1.3
Component: General → DOM: Device Interfaces
Product: Firefox OS → Core
Bug 947432 landed, so nominating this for 1.3 also.
blocking-b2g: --- → 1.3?
Blocks: 950307
Comment on attachment 8344560 [details] [diff] [review]

Review of attachment 8344560 [details] [diff] [review]:

::: b2g/chrome/content/payment.js
@@ +104,5 @@
> +function PaymentSettings() {
> +  this.dataServiceId = 0;
> +  Services.obs.addObserver(this, kMozSettingsChangedObserverTopic, false);
> +  gSettingsService.createLock().get(kRilDefaultDataServiceId, this);
> +}

nit: add blank line

@@ +128,5 @@
> +    }
> +
> +    try {
> +      let setting = JSON.parse(aData);
> +      if (!setting.key || setting.key != kRilDefaultDataServiceId) {

nit: |setting.key !==| should work
Attachment #8344560 - Flags: review?(fabrice) → review+
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
This is a requirement for 1.3 payment provider support with DSDS landing, so this is a blocker.
blocking-b2g: 1.3? → 1.3+
You need to log in before you can comment on or make changes to this bug.