/
schema.graphqls
153 lines (126 loc) · 13.8 KB
/
schema.graphqls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Copyright © Magento, Inc. All rights reserved.
# See COPYING.txt for license details.
type Query {
getPayflowLinkToken(input: PayflowLinkTokenInput!): PayflowLinkToken @resolver(class: "\\Magento\\PaypalGraphQl\\Model\\Resolver\\PayflowLinkToken") @doc(description: "Retrieve payment credentials for transaction. Use this query for Payflow Link and Payments Advanced payment methods.")
getHostedProUrl(input: HostedProUrlInput!): HostedProUrl @resolver(class: "\\Magento\\PaypalGraphQl\\Model\\Resolver\\HostedProUrl") @doc(description: "Retrieve secure PayPal url for Payments Pro Hosted Solution transaction.")
}
type Mutation {
createPaypalExpressToken(input: PaypalExpressTokenInput!): PaypalExpressTokenOutput @resolver(class: "\\Magento\\PaypalGraphQl\\Model\\Resolver\\PaypalExpressToken") @doc(description:"Initiates an Express Checkout transaction and receives a token. Use this mutation for Express Checkout and Payments Standard payment methods.")
createPayflowProToken(input: PayflowProTokenInput!): CreatePayflowProTokenOutput @resolver(class: "\\Magento\\PaypalGraphQl\\Model\\Resolver\\PayflowProToken") @doc(description: "Initiates a transaction and receives a token. Use this mutation for Payflow Pro and Payments Pro payment methods")
handlePayflowProResponse(input: PayflowProResponseInput!): PayflowProResponseOutput @resolver(class: "\\Magento\\PaypalGraphQl\\Model\\Resolver\\PayflowProResponse") @doc(description: "Handles payment response and saves payment in Quote. Use this mutations for Payflow Pro and Payments Pro payment methods.")
}
input PaypalExpressTokenInput @doc(description: "Defines the attributes required to receive a payment token for Express Checkout and Payments Standard payment methods.") {
cart_id: String! @doc(description:"The unique ID that identifies the customer's cart")
code: String! @doc(description:"Payment method code")
urls: PaypalExpressUrlsInput! @doc(description:"A set of relative URLs that PayPal uses in response to various actions during the authorization process")
use_paypal_credit: Boolean @doc(description: "Indicates whether the buyer clicked the PayPal credit button. The default value is false")
express_button: Boolean @doc(description: "Indicates whether the buyer selected the quick checkout button. The default value is false")
}
type PaypalExpressToken @doc(description: "Deprecated: use type `PaypalExpressTokenOutput` instead") {
token: String @deprecated(reason: "Use field `token` of type `PaypalExpressTokenOutput` instead") @doc(description:"The token returned by PayPal")
paypal_urls: PaypalExpressUrlList @deprecated(reason: "Use field `paypal_urls` of type `PaypalExpressTokenOutput` instead") @doc(description:"A set of URLs that allow the buyer to authorize payment and adjust checkout details")
}
type PaypalExpressTokenOutput @doc(description: "Contains the token returned by PayPal and a set of URLs that allow the buyer to authorize payment and adjust checkout details. Applies to Express Checkout and Payments Standard payment methods.") {
token: String @doc(description:"The token returned by PayPal")
paypal_urls: PaypalExpressUrlList @doc(description:"A set of URLs that allow the buyer to authorize payment and adjust checkout details")
}
type PayflowLinkToken @doc(description:"Contains information used to generate PayPal iframe for transaction. Applies to Payflow Link and Payments Advanced payment methods.") {
secure_token: String @doc(description:"Secure token generated by PayPal")
secure_token_id: String @doc(description:"Secure token ID generated by PayPal")
mode: PayflowLinkMode @doc(description:"Mode for Payflow transaction")
paypal_url: String @doc(description:"PayPal URL used for requesting Payflow form")
}
type HostedProUrl @doc(description:"Contains secure URL used for Payments Pro Hosted Solution payment method.") {
secure_form_url: String @doc(description:"Secure Url generated by PayPal")
}
input HostedProUrlInput @doc(description:"The required input to request the secure URL for Payments Pro Hosted Solution payment."){
cart_id: String! @doc(description:"The unique ID that identifies the customer's cart")
}
input PaymentMethodInput {
paypal_express: PaypalExpressInput @doc(description:"Required input for Express Checkout and Payments Standard payments")
payflow_express: PayflowExpressInput @doc(description:"Required input for Payflow Express Checkout payments")
payflow_link: PayflowLinkInput @doc(description:"Required input for PayPal Payflow Link and Payments Advanced payments")
payflowpro: PayflowProInput @doc(description: "Required input type for PayPal Payflow Pro and Payment Pro payments")
hosted_pro: HostedProInput @doc(description:"Required input for PayPal Hosted pro payments")
payflowpro_cc_vault: VaultTokenInput @doc(description:"Required input type for PayPal Payflow Pro vault payments")
}
input HostedProInput @doc(description:"A set of relative URLs that PayPal will use in response to various actions during the authorization process. Magento prepends the base URL to this value to create a full URL. For example, if the full URL is https://www.example.com/path/to/page.html, the relative URL is path/to/page.html. Use this input for Payments Pro Hosted Solution payment method.") {
return_url: String! @doc(description:"The relative URL of the final confirmation page that PayPal will redirect to upon payment success. If the full URL to this page is https://www.example.com/paypal/action/return.html, the relative URL is paypal/action/return.html.")
cancel_url: String! @doc(description:"The relative URL of the page that PayPal will redirect to when the buyer cancels the transaction in order to choose a different payment method. If the full URL to this page is https://www.example.com/paypal/action/cancel.html, the relative URL is paypal/action/cancel.html.")
}
input PaypalExpressInput @doc(description:"Required input for Express Checkout and Payments Standard payments") {
payer_id: String! @doc(description:"The unique ID of the PayPal user")
token: String! @doc(description:"The token returned by the createPaypalExpressToken mutation")
}
input PayflowExpressInput @doc(description:"Required input for Payflow Express Checkout payments") {
payer_id: String! @doc(description:"The unique ID of the PayPal user")
token: String! @doc(description:"The token returned by the createPaypalExpressToken mutation")
}
input PaypalExpressUrlsInput @doc(description:"A set of relative URLs that PayPal will use in response to various actions during the authorization process. Magento prepends the base URL to this value to create a full URL. For example, if the full URL is https://www.example.com/path/to/page.html, the relative URL is path/to/page.html. Use this input for Express Checkout and Payments Standard payment methods.") {
return_url: String! @doc(description:"The relative URL of the final confirmation page that PayPal will redirect to upon payment success. If the full URL to this page is https://www.example.com/paypal/action/return.html, the relative URL is paypal/action/return.html.")
cancel_url: String! @doc(description:"The relative URL of the page that PayPal will redirect to when the buyer cancels the transaction in order to choose a different payment method. If the full URL to this page is https://www.example.com/paypal/action/cancel.html, the relative URL is paypal/action/cancel.html.")
success_url: String @doc(description:"The relative URL of the order confirmation page that PayPal will redirect to when the payment is successful and additional confirmation is not needed. Not applicable to most PayPal solutions. If the full URL to this page is https://www.example.com/paypal/action/success.html, the relative URL is paypal/action/success.html.")
pending_url: String @doc(description:"The relative URL of the page that PayPal will redirect to when the payment has been put on hold for additional review. This condition mostly applies to ACH transactions, and is not applicable to most PayPal solutions. If the full URL to this page is https://www.example.com/paypal/action/success_pending.html, the relative URL is paypal/action/success_pending.html. ")
}
type PaypalExpressUrlList @doc(description:"A set of URLs that allow the buyer to authorize payment and adjust checkout details for Express Checkout and Payments Standard transactions.") {
start: String @doc(description:"The URL to the PayPal login page")
edit: String @doc(description:"The PayPal URL that allows the buyer to edit their checkout details")
}
input PayflowLinkInput @doc(description:"A set of relative URLs that PayPal will use in response to various actions during the authorization process. Magento prepends the base URL to this value to create a full URL. For example, if the full URL is https://www.example.com/path/to/page.html, the relative URL is path/to/page.html. Use this input for Payflow Link and Payments Advanced payment methods.") {
return_url: String! @doc(description:"The relative URL of the order confirmation page that PayPal will redirect to when the payment is successful and additional confirmation is not needed. If the full URL to this page is https://www.example.com/paypal/action/return.html, the relative URL is paypal/action/return.html.")
cancel_url: String! @doc(description:"The relative URL of the page that PayPal will redirect to when the buyer cancels the transaction in order to choose a different payment method. If the full URL to this page is https://www.example.com/paypal/action/cancel.html, the relative URL is paypal/action/cancel.html.")
error_url: String! @doc(description:"The relative URL of the transaction error page that PayPal will redirect to upon payment error. If the full URL to this page is https://www.example.com/paypal/action/error.html, the relative URL is paypal/action/error.html.")
}
input PayflowLinkTokenInput @doc(description:"Input required to fetch payment token information for Payflow Link and Payments Advanced payment methods.") {
cart_id: String! @doc(description:"The unique ID that identifies the customer's cart")
}
enum PayflowLinkMode @doc(description:"Mode for payment: TEST or LIVE. Applies to Payflow Link and Payments Advanced payment methods.") {
TEST
LIVE
}
input PayflowProTokenInput @doc(description:"Input required to fetch payment token information for Payflow Pro and Payments Pro payment methods."){
cart_id: String! @doc(description:"The unique ID that identifies the customer's cart")
urls: PayflowProUrlInput! @doc(description:"A set of relative URLs that PayPal uses for callback.")
}
input PayflowProInput @doc(description:"Required input for Payflow Pro and Payments Pro payment methods.") {
cc_details: CreditCardDetailsInput! @doc(description: "Required input for credit card related information")
is_active_payment_token_enabler: Boolean @doc(description:"States whether details about the customer's credit/debit card should be tokenized for later usage. Required only if Vault is enabled for PayPal Payflow Pro payment integration.")
}
input CreditCardDetailsInput @doc(description:"Required fields for Payflow Pro and Payments Pro credit card payments") {
cc_type: String! @doc(description: "Credit card type")
cc_exp_year: Int! @doc(description: "Credit card expiration year")
cc_exp_month: Int! @doc(description: "Credit card expiration month")
cc_last_4: Int! @doc(description: "Last 4 digits of the credit card")
}
input PayflowProUrlInput @doc(description:"A set of relative URLs that PayPal will use in response to various actions during the authorization process. Magento prepends the base URL to this value to create a full URL. For example, if the full URL is https://www.example.com/path/to/page.html, the relative URL is path/to/page.html. Use this input for Payflow Pro and Payment Pro payment methods.") {
return_url: String! @doc(description:"The relative URL of the final confirmation page that PayPal will redirect to upon payment success. If the full URL to this page is https://www.example.com/paypal/action/return.html, the relative URL is paypal/action/return.html.")
cancel_url: String! @doc(description:"The relative URL of the page that PayPal will redirect to when the buyer cancels the transaction in order to choose a different payment method. If the full URL to this page is https://www.example.com/paypal/action/cancel.html, the relative URL is paypal/action/cancel.html.")
error_url: String! @doc(description:"The relative URL of the transaction error page that PayPal will redirect to upon payment error. If the full URL to this page is https://www.example.com/paypal/action/error.html, the relative URL is paypal/action/error.html.")
}
type PayflowProToken @deprecated(reason: "Use CreatePayflowProTokenOutput instead.") @doc(description: "Contains the secure information used to authorize transaction. Applies to Payflow Pro and Payments Pro payment methods.") {
secure_token: String!
secure_token_id: String!
response_message: String!
result: Int!
result_code: Int!
}
type CreatePayflowProTokenOutput @doc(description: "Contains the secure information used to authorize transaction. Applies to Payflow Pro and Payments Pro payment methods.") {
secure_token: String!
secure_token_id: String!
response_message: String!
result: Int!
result_code: Int!
}
input PayflowProResponseInput @doc(description:"Input required to complete payment. Applies to Payflow Pro and Payments Pro payment methods.") {
cart_id: String!
paypal_payload: String!
}
type PayflowProResponseOutput {
cart: Cart!
}
type StoreConfig {
payment_payflowpro_cc_vault_active: String @doc(description: "Payflow Pro vault status.")
}
input VaultTokenInput @doc(description:"Required input for payment methods with Vault support.") {
public_hash: String! @doc(description: "The public hash of the payment token")
}