congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PaymentMethodInfoBuilder.paymentInterface
Code IndexAdd Tabnine to your IDE (free)

How to use
paymentInterface
method
in
io.sphere.sdk.payments.PaymentMethodInfoBuilder

Best Java code snippets using io.sphere.sdk.payments.PaymentMethodInfoBuilder.paymentInterface (Showing top 7 results out of 315)

origin: com.commercetools.payment/common

public static CreatePaymentDataBuilder of(final SphereClient client,
                     final String paymentInterface,
                     final String paymentMethod,
                     final Cart cart,
                     final String reference) {
  return new CreatePaymentDataBuilder(
      client,
      PaymentMethodInfoBuilder.of().paymentInterface(paymentInterface).method(paymentMethod).build(),
      cart, reference);
}
origin: com.commercetools.sunrise.payment/common

public static CreatePaymentDataBuilder of(final SphereClient client,
                     final String paymentInterface,
                     final String paymentMethod,
                     final Cart cart,
                     final String reference) {
  return new CreatePaymentDataBuilder(
      client,
      PaymentMethodInfoBuilder.of().paymentInterface(paymentInterface).method(paymentMethod).build(),
      cart, reference);
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void withAnonymousId() {
  CustomerFixtures.withCustomerAndCart(client(), ((customer, cart) -> {
    final MonetaryAmount totalAmount = cart.getTotalPrice();
    final PaymentMethodInfo paymentMethodInfo = PaymentMethodInfoBuilder.of()
        .paymentInterface("payment interface X")
        .method("CREDIT_CARD")
        .build();
    final String anonymousId = randomString();
    final PaymentDraftBuilder paymentDraftBuilder = PaymentDraftBuilder.of(totalAmount)
        .paymentMethodInfo(paymentMethodInfo)
        .anonymousId(anonymousId);
    final Payment payment = client().executeBlocking(PaymentCreateCommand.of(paymentDraftBuilder.build()));
    assertThat(payment.getAnonymousId()).isEqualTo(anonymousId);
    assertThat(payment.getPaymentMethodInfo()).isEqualTo(paymentMethodInfo);
    assertThat(payment.getAmountPlanned()).isEqualTo(totalAmount);
    client().executeBlocking(PaymentDeleteCommand.of(payment));
  }));
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void payingPerCreditCart() {
  CustomerFixtures.withCustomerAndCart(client(), ((customer, cart) -> {
    final MonetaryAmount totalAmount = cart.getTotalPrice();
    final PaymentMethodInfo paymentMethodInfo = PaymentMethodInfoBuilder.of()
        .paymentInterface("payment interface X")
        .method("CREDIT_CARD")
        .build();
    final PaymentDraftBuilder paymentDraftBuilder = PaymentDraftBuilder.of(totalAmount)
        .customer(customer)
        .paymentMethodInfo(paymentMethodInfo)
        ;
    final Payment payment = client().executeBlocking(PaymentCreateCommand.of(paymentDraftBuilder.build()));
    assertThat(payment.getCustomer()).isEqualTo(payment.getCustomer());
    assertThat(payment.getPaymentMethodInfo()).isEqualTo(paymentMethodInfo);
    Assertions.assertThat(payment.getAmountPlanned()).isEqualTo(totalAmount);
    assertEventually(() -> {
      final PagedQueryResult<PaymentCreatedMessage> pagedQueryResult = client().executeBlocking(MessageQuery.of()
          .withPredicates(m -> m.resource().is(payment))
          .forMessageType(PaymentCreatedMessage.MESSAGE_HINT));
      assertThat(pagedQueryResult.head()).isPresent();
      final PaymentCreatedMessage paymentCreatedMessage = pagedQueryResult.head().get();
      assertThat(paymentCreatedMessage.getPayment().getId()).isEqualTo(payment.getId());
      assertThat(paymentCreatedMessage.getResource().getId()).isEqualTo(payment.getId());
    });
    client().executeBlocking(PaymentDeleteCommand.of(payment));
  }));
}
origin: commercetools/commercetools-jvm-sdk

final MonetaryAmount totalAmount = cart.getTotalPrice();
final PaymentMethodInfo paymentMethodInfo = PaymentMethodInfoBuilder.of()
    .paymentInterface(randomKey())
    .method("CREDIT_CARD")
    .build();
origin: commercetools/commercetools-jvm-sdk

final PaymentStatus paymentStatus = PaymentStatusBuilder.of().interfaceCode(randomKey()).interfaceText(randomString()).state(paidState).build();
final PaymentMethodInfo paymentMethodInfo = PaymentMethodInfoBuilder.of()
    .paymentInterface("payment interface X")
    .method("CREDIT_CARD")
    .name(randomSlug())
origin: commercetools/commercetools-jvm-sdk

final PaymentStatus paymentStatus = PaymentStatusBuilder.of().interfaceCode(randomKey()).interfaceText(randomString()).state(paidState).build();
final PaymentMethodInfo paymentMethodInfo = PaymentMethodInfoBuilder.of()
    .paymentInterface("payment interface X")
    .method("CREDIT_CARD")
    .name(randomSlug())
io.sphere.sdk.paymentsPaymentMethodInfoBuilderpaymentInterface

Popular methods of PaymentMethodInfoBuilder

  • build
  • method
  • of
  • <init>
  • name

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • startActivity (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JComboBox (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now