aboutsummaryrefslogtreecommitdiff
path: root/src/headless
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-10-01 20:45:36 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-10-01 20:46:22 +0200
commit1a23fbcb4fdad661feb9ea923761f7e02d7f6e8d (patch)
treeb34c72c43f69cd755b1aa5acff8a52345628bd3e /src/headless
parent831d27c4df6412a6e1920341cbe6770a994a5804 (diff)
adapt to instance changes
Diffstat (limited to 'src/headless')
-rw-r--r--src/headless/integrationtest.ts2
-rw-r--r--src/headless/merchant.ts4
-rw-r--r--src/headless/taler-wallet-cli.ts11
3 files changed, 3 insertions, 14 deletions
diff --git a/src/headless/integrationtest.ts b/src/headless/integrationtest.ts
index a692cabd0..6b3286904 100644
--- a/src/headless/integrationtest.ts
+++ b/src/headless/integrationtest.ts
@@ -28,7 +28,6 @@ export async function runIntegrationTest(args: {
bankBaseUrl: string;
merchantBaseUrl: string;
merchantApiKey: string;
- merchantInstance: string;
amountToWithdraw: string;
amountToSpend: string;
}) {
@@ -42,7 +41,6 @@ export async function runIntegrationTest(args: {
const myMerchant = new MerchantBackendConnection(
args.merchantBaseUrl,
- args.merchantInstance,
args.merchantApiKey,
);
diff --git a/src/headless/merchant.ts b/src/headless/merchant.ts
index 4861a7d2a..889eb2d6a 100644
--- a/src/headless/merchant.ts
+++ b/src/headless/merchant.ts
@@ -32,7 +32,6 @@ import URI = require("urijs");
export class MerchantBackendConnection {
constructor(
public merchantBaseUrl: string,
- public merchantInstance: string,
public apiKey: string,
) {}
@@ -47,7 +46,6 @@ export class MerchantBackendConnection {
amount,
summary,
fulfillment_url: fulfillmentUrl,
- instance: this.merchantInstance,
},
};
const resp = await axios({
@@ -76,7 +74,7 @@ export class MerchantBackendConnection {
const resp = await axios({
method: "get",
url: reqUrl,
- params: { order_id: orderId, instance: this.merchantInstance },
+ params: { order_id: orderId },
responseType: "json",
headers: {
Authorization: `ApiKey ${this.apiKey}`,
diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts
index 7d4acb2f8..8c31e67d8 100644
--- a/src/headless/taler-wallet-cli.ts
+++ b/src/headless/taler-wallet-cli.ts
@@ -114,8 +114,7 @@ program
applyVerbose(program.verbose);
console.log("creating order");
const merchantBackend = new MerchantBackendConnection(
- "https://backend.test.taler.net",
- "default",
+ "https://backend.test.taler.net/",
"sandbox",
);
const orderResp = await merchantBackend.createOrder(
@@ -289,12 +288,7 @@ program
"https://backend.test.taler.net/",
)
.option(
- "-m, --merchant-instance <merchant-instance>",
- "merchant instance",
- "default",
- )
- .option(
- "-m, --merchant-api-key <merchant-api-key>",
+ "-k, --merchant-api-key <merchant-api-key>",
"merchant API key",
"sandbox",
)
@@ -321,7 +315,6 @@ program
exchangeBaseUrl: cmdObj.exchange,
merchantApiKey: cmdObj.merchantApiKey,
merchantBaseUrl: cmdObj.merchant,
- merchantInstance: cmdObj.merchantInstance,
}).catch(err => {
console.error("Failed with exception:");
console.error(err);