private void addGiftCertificateToOrderPayment(final OrderPayment orderPayment) { orderPayment.setPaymentMethod(PaymentType.GIFT_CERTIFICATE); GiftCertificate giftCertificate = new GiftCertificateImpl(); giftCertificate.setGiftCertificateCode(TEST_GIFT_CERTIFICATE_CODE); orderPayment.setGiftCertificate(giftCertificate); }
private void addPaymentTokenToOrderPayment(final OrderPayment orderPayment) { orderPayment.setPaymentMethod(PaymentType.PAYMENT_TOKEN); PaymentToken paymentToken = new PaymentTokenImpl.TokenBuilder().withDisplayValue(TEST_TOKEN_DISPLAY_VALUE).build(); orderPayment.usePaymentToken(paymentToken); }
private void addCreditCardToOrderPayment(final OrderPayment orderPayment) { orderPayment.setPaymentMethod(PaymentType.CREDITCARD); orderPayment.setCardType(TEST_CREDIT_CARD_TYPE); orderPayment.setUnencryptedCardNumber(TEST_CREDIT_CARD_NUMBER); }