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.
feat(Payment): changed 'capture' method to allow multipayments
changed 'capture' method to allow multipayments
- Loading branch information
1 parent
ae1e26a
commit 32d70e7
Showing
8 changed files
with
60 additions
and
200 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":"MPY-NKZBOXU4B44U","status":"AUTHORIZED","amount":{"total":8000,"gross":8000,"currency":"BRL"},"installmentCount":1,"payments":[{"id":"PAY-LBUR73TATCIC","status":"AUTHORIZED","delayCapture":true,"amount":{"total":4000,"gross":4000,"fees":289,"refunds":0,"liquid":3711,"currency":"BRL"},"installmentCount":1,"fundingInstrument":{"creditCard":{"id":"CRC-UARTCOXFHAQI","brand":"VISA","first6":"401200","last4":"1112","store":true,"holder":{"birthdate":"1988-12-30","birthDate":"1988-12-30","taxDocument":{"type":"CPF","number":"22222222222"},"fullname":"Jose Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":289}],"escrows":[{"id":"ECW-ITVY5KCWP3BF","status":"HOLD_PENDING","description":"Teste","amount":4000,"createdAt":"2017-10-02T10:12:24.000-03","updatedAt":"2017-10-02T10:12:24.000-03","_links":{"self":{"href":"https://sandbox.moip.com.br/v2/escrows/ECW-ITVY5KCWP3BF"},"order":{"href":"https://sandbox.moip.com.br/v2/orders/ORD-VQ9OAU9CVLRT","title":"ORD-VQ9OAU9CVLRT"},"payment":{"href":"https://sandbox.moip.com.br/v2/payments/PAY-LBUR73TATCIC","title":"PAY-LBUR73TATCIC"}}}],"events":[{"type":"PAYMENT.AUTHORIZED","createdAt":"2017-10-02T10:13:21.427-03"},{"type":"PAYMENT.IN_ANALYSIS","createdAt":"2017-10-02T10:12:25.000-03"},{"type":"PAYMENT.PRE_AUTHORIZED","createdAt":"2017-10-02T10:12:25.000-03"},{"type":"PAYMENT.CREATED","createdAt":"2017-10-02T10:12:24.000-03"},{"type":"PAYMENT.WAITING","createdAt":"2017-10-02T10:12:24.000-03"}],"receivers":[{"moipAccount":{"id":"MPA-E3D8493A06AE","login":"test@moip.com.br","fullname":"Moip Test"},"type":"PRIMARY","amount":{"total":3500,"refunds":0}},{"moipAccount":{"id":"MPA-8D5DCB4EF8B8","login":"test2@moip.com.br","fullname":"Moip Test2"},"type":"SECONDARY","amount":{"total":500,"fees":0,"refunds":0},"feePayor":false}],"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/payments/PAY-LBUR73TATCIC"},"order":{"href":"https://sandbox.moip.com.br/v2/orders/ORD-VQ9OAU9CVLRT","title":"ORD-VQ9OAU9CVLRT"}},"createdAt":"2017-10-02T10:12:24.000-03","updatedAt":"2017-10-02T10:13:21.426-03"},{"id":"PAY-6ICL332BUEXT","status":"AUTHORIZED","delayCapture":true,"amount":{"total":4000,"gross":4000,"fees":289,"refunds":0,"liquid":3711,"currency":"BRL"},"installmentCount":1,"fundingInstrument":{"creditCard":{"id":"CRC-UARTCOXFHAQI","brand":"VISA","first6":"401200","last4":"1112","store":true,"holder":{"birthdate":"1988-12-30","birthDate":"1988-12-30","taxDocument":{"type":"CPF","number":"22222222222"},"fullname":"Jose Portador da Silva"}},"method":"CREDIT_CARD"},"fees":[{"type":"TRANSACTION","amount":289}],"escrows":[{"id":"ECW-OX2Z8PFN6EG5","status":"HOLD_PENDING","description":"Teste","amount":4000,"createdAt":"2017-10-02T10:12:24.000-03","updatedAt":"2017-10-02T10:12:24.000-03","_links":{"self":{"href":"https://sandbox.moip.com.br/v2/escrows/ECW-OX2Z8PFN6EG5"},"order":{"href":"https://sandbox.moip.com.br/v2/orders/ORD-CMBFPT9AIVPC","title":"ORD-CMBFPT9AIVPC"},"payment":{"href":"https://sandbox.moip.com.br/v2/payments/PAY-6ICL332BUEXT","title":"PAY-6ICL332BUEXT"}}}],"events":[{"type":"PAYMENT.AUTHORIZED","createdAt":"2017-10-02T10:13:21.428-03"},{"type":"PAYMENT.IN_ANALYSIS","createdAt":"2017-10-02T10:12:25.000-03"},{"type":"PAYMENT.PRE_AUTHORIZED","createdAt":"2017-10-02T10:12:25.000-03"},{"type":"PAYMENT.CREATED","createdAt":"2017-10-02T10:12:24.000-03"},{"type":"PAYMENT.WAITING","createdAt":"2017-10-02T10:12:24.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-6ICL332BUEXT"},"order":{"href":"https://sandbox.moip.com.br/v2/orders/ORD-CMBFPT9AIVPC","title":"ORD-CMBFPT9AIVPC"}},"createdAt":"2017-10-02T10:12:24.000-03","updatedAt":"2017-10-02T10:13:21.427-03"}],"_links":{"self":{"href":"https://sandbox.moip.com.br/v2/multipayments/MPY-NKZBOXU4B44U"},"multiorder":{"href":"https://sandbox.moip.com.br/v2/multiorders/MOR-GZ5OKB7R36GO"}}} |
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 |
---|---|---|
@@ -1,189 +1 @@ | ||
{ | ||
"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" | ||
} | ||
} | ||
} | ||
} | ||
{"id":"MPY-V5CEK24WDD27","status":"WAITING","amount":{"total":8000,"gross":8000,"currency":"BRL"},"installmentCount":1,"fundingInstrument":{"boleto":{"expirationDate":"2017-09-30","lineCode":"23793.3912660000.13014077001.747904672980000008000","logoUri":"http://","instructionLines":{"first":"Primeiralinhaseinstrução","second":"Segundalinhaseinstrução","third":"Terceiralinhaseinstruçã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.3912660000.13014077001.747904672980000008000","logoUri":"http://","instructionLines":{"first":"Primeiralinhaseinstrução","second":"Segundalinhaseinstrução","third":"Terceiralinhaseinstruçã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":"MarcosSantanaSantos"},"type":"PRIMARY","amount":{"total":3500,"refunds":0}},{"moipAccount":{"id":"MPA-8D5DBB4EF8B8","login":"caio.gaspar@moip.com.br","fullname":"CaioGaspar"},"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.3912660000.13014077001.747904672980000008000","logoUri":"http://","instructionLines":{"first":"Primeiralinhaseinstrução","second":"Segundalinhaseinstrução","third":"Terceiralinhaseinstruçã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-8D5DCB4EF8B8","login":"test@moip.com.br","fullname":"MoipTest"},"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"}}}} |
Oops, something went wrong.