merchant test: pass h_contract
This commit is contained in:
parent
ea0e058b34
commit
9026b0aaad
@ -324,6 +324,7 @@ export const codecForPreparePayResultPaymentPossible = (): Codec<PreparePayResul
|
||||
.property("amountRaw", codecForAmountString())
|
||||
.property("contractTerms", codecForContractTerms())
|
||||
.property("proposalId", codecForString())
|
||||
.property("contractTermsHash", codecForString())
|
||||
.property(
|
||||
"status",
|
||||
codecForConstString(PreparePayResultType.PaymentPossible),
|
||||
@ -381,6 +382,7 @@ export interface PreparePayResultPaymentPossible {
|
||||
status: PreparePayResultType.PaymentPossible;
|
||||
proposalId: string;
|
||||
contractTerms: ContractTerms;
|
||||
contractTermsHash: string;
|
||||
amountRaw: string;
|
||||
amountEffective: string;
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ import {
|
||||
} from "./faultInjection";
|
||||
import { defaultCoinConfig } from "./denomStructures";
|
||||
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
|
||||
import { URL } from "url";
|
||||
|
||||
/**
|
||||
* Run a test case with a simple TESTKUDOS Taler environment, consisting
|
||||
@ -211,9 +212,12 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) {
|
||||
|
||||
const proposalId = preparePayResp.proposalId;
|
||||
|
||||
console.log("requesting", publicOrderStatusUrl);
|
||||
const orderUrlWithHash = new URL(publicOrderStatusUrl);
|
||||
orderUrlWithHash.searchParams.set("h_contract", preparePayResp.contractTermsHash);
|
||||
|
||||
publicOrderStatusResp = await axios.get(publicOrderStatusUrl, {
|
||||
console.log("requesting", orderUrlWithHash.href);
|
||||
|
||||
publicOrderStatusResp = await axios.get(orderUrlWithHash.href, {
|
||||
validateStatus: () => true,
|
||||
});
|
||||
|
||||
|
@ -1392,6 +1392,7 @@ export async function checkPaymentByProposalId(
|
||||
proposalId: proposal.proposalId,
|
||||
amountEffective: Amounts.stringify(totalCost),
|
||||
amountRaw: Amounts.stringify(res.paymentAmount),
|
||||
contractTermsHash: d.contractData.contractTermsHash,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user