CreateCheckoutPaymentMethod.ts 734 B

123456789101112131415161718192021222324252627
  1. import { gql, TypedDocumentNode } from "@apollo/client";
  2. import { CreateCheckoutPaymentMethodResponse } from "@/types/checkout/type";
  3. export const CREATE_CHECKOUT_PAYMENT_METHODS: TypedDocumentNode<CreateCheckoutPaymentMethodResponse> = gql`
  4. mutation CreateCheckoutPaymentMethod(
  5. $paymentMethod: String!
  6. $successUrl: String
  7. $failureUrl: String
  8. $cancelUrl: String
  9. ) {
  10. createCheckoutPaymentMethod(
  11. input: {
  12. paymentMethod: $paymentMethod
  13. paymentSuccessUrl: $successUrl
  14. paymentFailureUrl: $failureUrl
  15. paymentCancelUrl: $cancelUrl
  16. }
  17. ) {
  18. checkoutPaymentMethod {
  19. success
  20. message
  21. paymentGatewayUrl
  22. paymentData
  23. }
  24. }
  25. }
  26. `;