Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gentle-cases-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@exactly/mobile": patch
---

✨ add wallet provisioning
5 changes: 4 additions & 1 deletion .maestro/subflows/activateCard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ appId: ${APP_ID ?? "app.exactly"}
commands:
- runFlow: { file: scrollTo.yaml, env: { element: Accept and enable card } }
- tapOn: Accept and enable card
- assertVisible: Manually add your card to Apple Pay & Google Pay to make contactless payments.
- runFlow:
when: { platform: web }
commands:
- assertVisible: Manually add your card to Apple Pay & Google Pay to make contactless payments.
- tapOn: Close
- tapOn: Freeze card
- tapOn: { text: Freeze card, below: "Freeze your card?" }
Expand Down
29 changes: 29 additions & 0 deletions server/test/api/card.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,35 @@ describe("authenticated", () => {
expect(processorDetails).toHaveBeenCalledExactlyOnceWith("543c1771-beae-4f26-b662-44ea48b40dc6");
});

it("returns panda card provisioning without encrypted card data", async () => {
const getSecrets = vi.spyOn(panda, "getSecrets").mockRejectedValue(new Error("unexpected secrets request"));
const getPIN = vi.spyOn(panda, "getPIN").mockRejectedValue(new Error("unexpected PIN request"));
vi.spyOn(panda, "getCard").mockResolvedValueOnce(cardTemplate);
vi.spyOn(panda, "getUser").mockResolvedValueOnce(userTemplate);
const processorDetails = vi.spyOn(panda, "getProcessorDetails").mockResolvedValueOnce({
processorCardId: "proc-default",
timeBasedSecret: "secret-default",
});

const response = await appClient.index.$get(
{ header: {}, query: { scope: "provisioning" } },
{ headers: { "test-credential-id": "default" } },
);
const json = await response.json();

expect(response.status).toBe(200);
expect(json).toMatchObject({
cardId: "543c1771-beae-4f26-b662-44ea48b40dc6",
provisioning: { id: "proc-default", secret: "secret-default" },
});
Comment thread
aguxez marked this conversation as resolved.
expect(json).not.toHaveProperty("encryptedPan");
expect(json).not.toHaveProperty("encryptedCvc");
expect(json).not.toHaveProperty("pin");
expect(getSecrets).not.toHaveBeenCalled();
expect(getPIN).not.toHaveBeenCalled();
expect(processorDetails).toHaveBeenCalledExactlyOnceWith("543c1771-beae-4f26-b662-44ea48b40dc6");
});

it("returns panda card with signature product id", async () => {
vi.spyOn(panda, "getSecrets").mockResolvedValueOnce(panTemplate);
vi.spyOn(panda, "getPIN").mockResolvedValueOnce(pinTemplate);
Expand Down
1 change: 1 addition & 0 deletions src/assets/images/google-wallet-button-es.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading