Exemple #1
0
 @Test
 public void testChargePartialRefundPerCallAPIKey() throws StripeException {
   Charge createdCharge = Charge.create(defaultChargeParams);
   Map<String, Object> refundParams = new HashMap<String, Object>();
   final Integer REFUND_AMOUNT = 50;
   refundParams.put("amount", REFUND_AMOUNT);
   Charge refundedCharge = createdCharge.refund(refundParams, Stripe.apiKey);
   assertFalse(refundedCharge.getRefunded());
   assertEquals(refundedCharge.getAmountRefunded(), REFUND_AMOUNT);
 }
Exemple #2
0
 @Test
 public void testChargeRefundPerCallAPIKey() throws StripeException {
   Charge createdCharge = Charge.create(defaultChargeParams, Stripe.apiKey);
   Charge refundedCharge = createdCharge.refund(Stripe.apiKey);
   assertTrue(refundedCharge.getRefunded());
 }
Exemple #3
0
 @Test
 public void testChargeRefund() throws StripeException {
   Charge createdCharge = Charge.create(defaultChargeParams);
   Charge refundedCharge = createdCharge.refund();
   assertTrue(refundedCharge.getRefunded());
 }