-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GTMP-2008] - Incluir tokenCryptogram na sdk (#9)
[GTMP-2008] - Incluir tokenCryptogram na sdk
- Loading branch information
1 parent
df95c3a
commit 109c445
Showing
4 changed files
with
44 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -151,6 +151,37 @@ public void shouldCreateSaleWithCredit() throws PropertyException { | |
|
||
maxiPago.transactionRequest().execute(); | ||
} | ||
|
||
@Test | ||
public void shouldCreateSaleWithTokenCryptogram() throws PropertyException { | ||
MaxiPago maxiPago = prepareResponse(CAPTURED_RESPONSE, UNIVERSAL_API); | ||
|
||
maxiPago.sale() | ||
.setProcessorId("5") | ||
.setReferenceNum("CreateSaleWithTokenCryptogram") | ||
.setIpAddress("127.0.0.1") | ||
.billingAndShipping( | ||
(new Customer()).setName("Nome como esta gravado no cartao") | ||
.setAddress("Rua Volkswagen, 100") | ||
.setAddress2("0") | ||
.setDistrict("Jabaquara") | ||
.setCity("Sao Paulo") | ||
.setState("SP") | ||
.setPostalCode("11111111") | ||
.setCountry("BR") | ||
.setPhone("11111111111") | ||
.setEmail("[email protected]")) | ||
.setCreditCard( | ||
(new Card()).setNumber("5448280000000007") | ||
.setExpMonth("12") | ||
.setExpYear("2028") | ||
.setCvvNumber("123") | ||
.setTokenCryptogram("abc1238759uiokjflahdfkjlahs")) | ||
.setPayment(new Payment(100.0)); | ||
|
||
TransactionResponse response = maxiPago.transactionRequest().execute(); | ||
assertEquals("0", response.responseCode); | ||
} | ||
|
||
@Test | ||
public void shouldCreateSaleWithDebit() throws PropertyException { | ||
|