Correct bugs and adjust Buyer form.
This commit is contained in:
@@ -15,9 +15,13 @@ export interface ParticipantWithID extends Participant {
|
||||
|
||||
export interface Offer {
|
||||
amount: number;
|
||||
sellerID: string;
|
||||
lockId: string;
|
||||
sellerId: string;
|
||||
}
|
||||
|
||||
// Specs for BB Pay Sandbox
|
||||
// https://apoio.developers.bb.com.br/sandbox/spec/665797498bb48200130fc32c
|
||||
|
||||
export const createParticipant = async (participant: Participant) => {
|
||||
const response = await fetch(`${process.env.VUE_APP_API_URL}/participants`, {
|
||||
method: "PUT",
|
||||
@@ -39,5 +43,15 @@ export const getSolicitation = async (id: string) => {
|
||||
const response = await fetch(
|
||||
`${process.env.VUE_APP_API_URL}/solicitation/${id}`
|
||||
);
|
||||
return response.json();
|
||||
|
||||
const obj: any = response.json();
|
||||
|
||||
return {
|
||||
id: obj.numeroSolicitacao,
|
||||
lockId: obj.codigoConciliacaoSolicitacao,
|
||||
amount: obj.valorSolicitacao,
|
||||
qrcode: obj.pix.textoQrCode,
|
||||
status: obj.valorSomatorioPagamentosEfetivados >= obj.valorSolicitacao,
|
||||
signature: obj.assinatura,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user