This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(Payment): Added tests to multipayment
Added tests to multipayment
- Loading branch information
1 parent
c860b75
commit ae1e26a
Showing
5 changed files
with
279 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"id":"MOR-J1G1C9W4P1SD","ownId":"meu_multiorder_id","status":"CREATED","createdAt":"2017-09-29T10:26:21.266-03","updatedAt":"","amount":{"total":8000,"gross":8000,"currency":"BRL"},"orders":[{"id":"ORD-740WQDF7K50X","ownId":"pedido_1_id","status":"CREATED","platform":"V2","createdAt":"2017-09-29T10:26:21.266-03","updatedAt":"2017-09-29T10:26:21.266-03","amount":{"paid":0,"total":4000,"fees":0,"refunds":0,"liquid":0,"otherReceivers":3500,"currency":"BRL","subtotals":{"shipping":2000,"addition":0,"discount":0,"items":2000}},"items":[{"product":"Camisa Verde e Amarelo - Brasil","price":2000,"detail":"Seleção Brasileira","quantity":1}],"customer":{"id":"CUS-02ZE76RXIG24","ownId":"customer[1234]","fullname":"Joao Sousa","createdAt":"2017-06-21T11:02:24.000-03","birthDate":"1988-12-30","email":"joao.sousa@email.com","fundingInstrument":{"creditCard":{"id":"CRC-UARTCOXFHAQI","brand":"VISA","first6":"401200","last4":"1112","store":true},"method":"CREDIT_CARD"},"phone":{"countryCode":"55","areaCode":"11","number":"66778899"},"taxDocument":{"type":"CPF","number":"22222222222"},"shippingAddress":{"zipCode":"01234000","street":"Avenida Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"moipAccount":{"id":"MPA-PQ0H8UZYNNWY"},"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/customers/CUS-02ZE76RXIG24"},"hostedAccount":{"redirectHref":"https://hostedaccount-sandbox.moip.com.br?token=22e9ac2f-3cbd-4fa1-b143-8c0277565b39&id=CUS-02ZE76RXIG24&mpa=MPA-8D5DBB4EF8B8"}},"fundingInstruments":[{"creditCard":{"id":"CRC-UARTCOXFHAQI","brand":"VISA","first6":"401200","last4":"1112","store":true},"method":"CREDIT_CARD"}]},"payments":[],"escrows":[],"refunds":[],"entries":[],"events":[{"type":"ORDER.CREATED","createdAt":"2017-09-29T10:26:21.266-03","description":""}],"receivers":[{"moipAccount":{"id":"MPA-E3C8493A06AE","login":"marcos150895@gmail.com","fullname":"Marcos Santana Santos"},"type":"PRIMARY","amount":{"total":3500,"refunds":0}},{"moipAccount":{"id":"MPA-8D5DBB4EF8B8","login":"caio.gaspar@moip.com.br","fullname":"Caio Gaspar"},"type":"SECONDARY","amount":{"total":500,"refunds":0}}],"shippingAddress":{"zipCode":"01234000","street":"Avenida Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/orders/ORD-740WQDF7K50X"}}},{"id":"ORD-JR07AW1L8BZS","ownId":"pedido_2_id","status":"CREATED","platform":"V2","createdAt":"2017-09-29T10:26:21.279-03","updatedAt":"2017-09-29T10:26:21.279-03","amount":{"paid":0,"total":4000,"fees":0,"refunds":0,"liquid":0,"otherReceivers":0,"currency":"BRL","subtotals":{"shipping":3000,"addition":0,"discount":0,"items":1000}},"items":[{"product":"Camisa Preta - Alemanha","price":1000,"detail":"Camiseta da Copa 2014","quantity":1}],"customer":{"id":"CUS-02ZE76RXIG24","ownId":"customer[1234]","fullname":"Joao Sousa","createdAt":"2017-06-21T11:02:24.000-03","birthDate":"1988-12-30","email":"joao.sousa@email.com","fundingInstrument":{"creditCard":{"id":"CRC-UARTCOXFHAQI","brand":"VISA","first6":"401200","last4":"1112","store":true},"method":"CREDIT_CARD"},"phone":{"countryCode":"55","areaCode":"11","number":"66778899"},"taxDocument":{"type":"CPF","number":"22222222222"},"shippingAddress":{"zipCode":"01234000","street":"Avenida Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"moipAccount":{"id":"MPA-PQ0H8UZYNNWY"},"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/customers/CUS-02ZE76RXIG24"},"hostedAccount":{"redirectHref":"https://hostedaccount-sandbox.moip.com.br?token=22e9ac2f-3cbd-4fa1-b143-8c0277565b39&id=CUS-02ZE76RXIG24&mpa=MPA-8D5DBB4EF8B8"}},"fundingInstruments":[{"creditCard":{"id":"CRC-UARTCOXFHAQI","brand":"VISA","first6":"401200","last4":"1112","store":true},"method":"CREDIT_CARD"}]},"payments":[],"escrows":[],"refunds":[],"entries":[],"events":[{"type":"ORDER.CREATED","createdAt":"2017-09-29T10:26:21.279-03","description":""}],"receivers":[{"moipAccount":{"id":"MPA-8D5DBB4EF8B8","login":"caio.gaspar@moip.com.br","fullname":"Caio Gaspar"},"type":"PRIMARY","amount":{"total":4000,"fees":0,"refunds":0},"feePayor":true}],"shippingAddress":{"zipCode":"01234000","street":"Avenida Faria Lima","streetNumber":"2927","complement":"8","city":"Sao Paulo","district":"Itaim","state":"SP","country":"BRA"},"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/orders/ORD-JR07AW1L8BZS"}}}],"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/orders/MOR-J1G1C9W4P1SD"},"checkout":{"payCreditCard":{"redirectHref":"https://checkout-sandbox.moip.com.br/creditcard/MOR-J1G1C9W4P1SD"},"payBoleto":{"redirectHref":"https://checkout-sandbox.moip.com.br/boleto/MOR-J1G1C9W4P1SD"},"payOnlineBankDebitItau":{"redirectHref":"https://checkout-sandbox.moip.com.br/debit/itau/MOR-J1G1C9W4P1SD"}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
{ | ||
"id": "MPY-V5CEK24WDD27", | ||
"status": "WAITING", | ||
"amount": { | ||
"total": 8000, | ||
"gross": 8000, | ||
"currency": "BRL" | ||
}, | ||
"installmentCount": 1, | ||
"fundingInstrument": { | ||
"boleto": { | ||
"expirationDate": "2017-09-30", | ||
"lineCode": "23793.39126 60000.130140 77001.747904 6 72980000008000", | ||
"logoUri": "http://", | ||
"instructionLines": { | ||
"first": "Primeira linha se instrução", | ||
"second": "Segunda linha se instrução", | ||
"third": "Terceira linha se instrução" | ||
} | ||
}, | ||
"method": "BOLETO" | ||
}, | ||
"payments": [ | ||
{ | ||
"id": "PAY-ATNIHH3XI4KJ", | ||
"status": "WAITING", | ||
"delayCapture": false, | ||
"amount": { | ||
"total": 4000, | ||
"gross": 4000, | ||
"fees": 0, | ||
"refunds": 0, | ||
"liquid": 4000, | ||
"currency": "BRL" | ||
}, | ||
"installmentCount": 1, | ||
"fundingInstrument": { | ||
"boleto": { | ||
"expirationDate": "2017-09-30", | ||
"lineCode": "23793.39126 60000.130140 77001.747904 6 72980000008000", | ||
"logoUri": "http://", | ||
"instructionLines": { | ||
"first": "Primeira linha se instrução", | ||
"second": "Segunda linha se instrução", | ||
"third": "Terceira linha se instrução" | ||
} | ||
}, | ||
"method": "BOLETO" | ||
}, | ||
"fees": [ | ||
{ | ||
"type": "TRANSACTION", | ||
"amount": 0 | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"type": "PAYMENT.CREATED", | ||
"createdAt": "2017-09-29T10:33:46.000-03" | ||
}, | ||
{ | ||
"type": "PAYMENT.WAITING", | ||
"createdAt": "2017-09-29T10:33:46.000-03" | ||
} | ||
], | ||
"receivers": [ | ||
{ | ||
"moipAccount": { | ||
"id": "MPA-E3C8493A06AE", | ||
"login": "marcos150895@gmail.com", | ||
"fullname": "Marcos Santana Santos" | ||
}, | ||
"type": "PRIMARY", | ||
"amount": { | ||
"total": 3500, | ||
"refunds": 0 | ||
} | ||
}, | ||
{ | ||
"moipAccount": { | ||
"id": "MPA-8D5DBB4EF8B8", | ||
"login": "caio.gaspar@moip.com.br", | ||
"fullname": "Caio Gaspar" | ||
}, | ||
"type": "SECONDARY", | ||
"amount": { | ||
"total": 500, | ||
"fees": 0, | ||
"refunds": 0 | ||
}, | ||
"feePayor": false | ||
} | ||
], | ||
"_links": { | ||
"self": { | ||
"href": "https://sandbox.moip.com.br/v2/payments/PAY-ATNIHH3XI4KJ" | ||
}, | ||
"order": { | ||
"href": "https://sandbox.moip.com.br/v2/orders/ORD-U15QTT5DPYSZ", | ||
"title": "ORD-U15QTT5DPYSZ" | ||
} | ||
}, | ||
"createdAt": "2017-09-29T10:33:46.000-03", | ||
"updatedAt": "2017-09-29T10:33:46.000-03" | ||
}, | ||
{ | ||
"id": "PAY-4YIMXKU1SNHW", | ||
"status": "WAITING", | ||
"delayCapture": false, | ||
"amount": { | ||
"total": 4000, | ||
"gross": 4000, | ||
"fees": 0, | ||
"refunds": 0, | ||
"liquid": 4000, | ||
"currency": "BRL" | ||
}, | ||
"installmentCount": 1, | ||
"fundingInstrument": { | ||
"boleto": { | ||
"expirationDate": "2017-09-30", | ||
"lineCode": "23793.39126 60000.130140 77001.747904 6 72980000008000", | ||
"logoUri": "http://", | ||
"instructionLines": { | ||
"first": "Primeira linha se instrução", | ||
"second": "Segunda linha se instrução", | ||
"third": "Terceira linha se instrução" | ||
} | ||
}, | ||
"method": "BOLETO" | ||
}, | ||
"fees": [ | ||
{ | ||
"type": "TRANSACTION", | ||
"amount": 0 | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"type": "PAYMENT.CREATED", | ||
"createdAt": "2017-09-29T10:33:46.000-03" | ||
}, | ||
{ | ||
"type": "PAYMENT.WAITING", | ||
"createdAt": "2017-09-29T10:33:46.000-03" | ||
} | ||
], | ||
"receivers": [ | ||
{ | ||
"moipAccount": { | ||
"id": "MPA-8D5DBB4EF8B8", | ||
"login": "caio.gaspar@moip.com.br", | ||
"fullname": "Caio Gaspar" | ||
}, | ||
"type": "PRIMARY", | ||
"amount": { | ||
"total": 4000, | ||
"refunds": 0 | ||
} | ||
} | ||
], | ||
"_links": { | ||
"self": { | ||
"href": "https://sandbox.moip.com.br/v2/payments/PAY-4YIMXKU1SNHW" | ||
}, | ||
"order": { | ||
"href": "https://sandbox.moip.com.br/v2/orders/ORD-Q3R12CHPQPGO", | ||
"title": "ORD-Q3R12CHPQPGO" | ||
} | ||
}, | ||
"createdAt": "2017-09-29T10:33:46.000-03", | ||
"updatedAt": "2017-09-29T10:33:46.000-03" | ||
} | ||
], | ||
"_links": { | ||
"self": { | ||
"href": "https://sandbox.moip.com.br/v2/multipayments/MPY-V5CEK24WDD27" | ||
}, | ||
"multiorder": { | ||
"href": "https://sandbox.moip.com.br/v2/multiorders/MOR-R0T7IYR36W3T" | ||
}, | ||
"checkout": { | ||
"payBoleto": { | ||
"printHref": "https://checkout-sandbox.moip.com.br/boleto/MPY-V5CEK24WDD27/print", | ||
"redirectHref": "https://checkout-sandbox.moip.com.br/boleto/MPY-V5CEK24WDD27" | ||
} | ||
} | ||
} | ||
} |