mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-05-09 04:25:54 +08:00
支付宝公钥证书案例
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<dependency>
|
||||
<groupId>com.egzosn</groupId>
|
||||
<artifactId>{module-name}</artifactId>
|
||||
<version>2.13.3</version>
|
||||
<version>2.13.3-b1</version>
|
||||
</dependency>
|
||||
|
||||
```
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.Map;
|
||||
/**
|
||||
* 退款结果
|
||||
* <p>
|
||||
* 这里继承Map为兼容方案,后续版本进行删除
|
||||
*
|
||||
* @author Egan
|
||||
* <pre>
|
||||
|
||||
@@ -59,6 +59,7 @@ public class PayPalConfigStorage extends BasePayConfigStorage {
|
||||
|
||||
/**
|
||||
* 获取取消页面的url
|
||||
* @return 取消页面的url
|
||||
*/
|
||||
public String getCancelUrl() {
|
||||
return getNotifyUrl();
|
||||
|
||||
@@ -22,6 +22,9 @@ public class Amount {
|
||||
|
||||
/**
|
||||
* Parameterized Constructor
|
||||
*
|
||||
* @param currency 类型
|
||||
* @param total 金额
|
||||
*/
|
||||
public Amount(String currency, String total) {
|
||||
this.currency = currency;
|
||||
|
||||
@@ -56,6 +56,7 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* Parameterized Constructor
|
||||
* @param amount 金额
|
||||
*/
|
||||
public CartBase(Amount amount) {
|
||||
this.amount = amount;
|
||||
@@ -63,72 +64,72 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* Merchant identifier to the purchase unit. Optional parameter
|
||||
* @return identifier
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getReferenceId() {
|
||||
return this.referenceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Amount being collected.
|
||||
* @return amount 金额
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public Amount getAmount() {
|
||||
return this.amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recipient of the funds in this transaction.
|
||||
* @return Recipient
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public Payee getPayee() {
|
||||
return this.payee;
|
||||
}
|
||||
|
||||
/**
|
||||
* Description of what is being paid for.
|
||||
* @return Description
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Note to the recipient of the funds in this transaction.
|
||||
* @return Note
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getNoteToPayee() {
|
||||
return this.noteToPayee;
|
||||
}
|
||||
|
||||
/**
|
||||
* free-form field for the use of clients
|
||||
* @return custom
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getCustom() {
|
||||
return this.custom;
|
||||
}
|
||||
|
||||
/**
|
||||
* invoice number to track this payment
|
||||
* @return invoice number
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getInvoiceNumber() {
|
||||
return this.invoiceNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Soft descriptor used when charging this funding source. If length exceeds max length, the value will be truncated
|
||||
* @return SoftDescriptor
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getSoftDescriptor() {
|
||||
return this.softDescriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card`
|
||||
* @return Soft descriptor
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getSoftDescriptorCity() {
|
||||
return this.softDescriptorCity;
|
||||
}
|
||||
@@ -136,25 +137,25 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* URL to send payment notifications
|
||||
* @return URL
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getNotifyUrl() {
|
||||
return this.notifyUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Url on merchant site pertaining to this payment.
|
||||
* @return URL
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getOrderUrl() {
|
||||
return this.orderUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merchant identifier to the purchase unit. Optional parameter
|
||||
* @param referenceId identifier
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setReferenceId(final String referenceId) {
|
||||
this.referenceId = referenceId;
|
||||
return this;
|
||||
@@ -162,9 +163,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* Amount being collected.
|
||||
* @param amount 金额
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setAmount(final Amount amount) {
|
||||
this.amount = amount;
|
||||
return this;
|
||||
@@ -172,9 +173,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* Recipient of the funds in this transaction.
|
||||
* @param payee Recipient
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setPayee(final Payee payee) {
|
||||
this.payee = payee;
|
||||
return this;
|
||||
@@ -182,9 +183,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* Description of what is being paid for.
|
||||
* @param description description
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setDescription(final String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
@@ -192,9 +193,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* Note to the recipient of the funds in this transaction.
|
||||
* @param noteToPayee noteToPayee
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setNoteToPayee(final String noteToPayee) {
|
||||
this.noteToPayee = noteToPayee;
|
||||
return this;
|
||||
@@ -202,9 +203,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* free-form field for the use of clients
|
||||
* @param custom custom
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setCustom(final String custom) {
|
||||
this.custom = custom;
|
||||
return this;
|
||||
@@ -212,9 +213,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* invoice number to track this payment
|
||||
* @param invoiceNumber invoiceNumber
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setInvoiceNumber(final String invoiceNumber) {
|
||||
this.invoiceNumber = invoiceNumber;
|
||||
return this;
|
||||
@@ -222,9 +223,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* Soft descriptor used when charging this funding source. If length exceeds max length, the value will be truncated
|
||||
* @param softDescriptor softDescriptor
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setSoftDescriptor(final String softDescriptor) {
|
||||
this.softDescriptor = softDescriptor;
|
||||
return this;
|
||||
@@ -232,9 +233,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* Soft descriptor city used when charging this funding source. If length exceeds max length, the value will be truncated. Only supported when the `payment_method` is set to `credit_card`
|
||||
* @param softDescriptorCity softDescriptorCity
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setSoftDescriptorCity(final String softDescriptorCity) {
|
||||
this.softDescriptorCity = softDescriptorCity;
|
||||
return this;
|
||||
@@ -244,9 +245,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* URL to send payment notifications
|
||||
* @param notifyUrl notifyUrl
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setNotifyUrl(final String notifyUrl) {
|
||||
this.notifyUrl = notifyUrl;
|
||||
return this;
|
||||
@@ -254,9 +255,9 @@ public class CartBase {
|
||||
|
||||
/**
|
||||
* Url on merchant site pertaining to this payment.
|
||||
* @param orderUrl orderUrl
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public CartBase setOrderUrl(final String orderUrl) {
|
||||
this.orderUrl = orderUrl;
|
||||
return this;
|
||||
|
||||
@@ -4,170 +4,121 @@ package com.egzosn.pay.paypal.bean.order;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Error {
|
||||
/**
|
||||
* Human readable, unique name of the error.
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* Message describing the error.
|
||||
*/
|
||||
private String message;
|
||||
/**
|
||||
* Additional details of the error
|
||||
*/
|
||||
private List<ErrorDetails> details;
|
||||
/**
|
||||
* URI for detailed information related to this error for the developer.
|
||||
*/
|
||||
private String informationLink;
|
||||
/**
|
||||
* PayPal internal identifier used for correlation purposes.
|
||||
*/
|
||||
private String debugId;
|
||||
public class Error {
|
||||
/**
|
||||
* Human readable, unique name of the error.
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* Message describing the error.
|
||||
*/
|
||||
private String message;
|
||||
/**
|
||||
* Additional details of the error
|
||||
*/
|
||||
private List<ErrorDetails> details;
|
||||
/**
|
||||
* URI for detailed information related to this error for the developer.
|
||||
*/
|
||||
private String informationLink;
|
||||
/**
|
||||
* PayPal internal identifier used for correlation purposes.
|
||||
*/
|
||||
private String debugId;
|
||||
|
||||
/**
|
||||
* @deprecated This property is not available publicly
|
||||
* PayPal internal error code.
|
||||
*/
|
||||
@Deprecated
|
||||
private String code;
|
||||
/**
|
||||
* @deprecated This property is not available publicly
|
||||
* PayPal internal error code.
|
||||
*/
|
||||
@Deprecated
|
||||
private String code;
|
||||
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
*/
|
||||
public Error() {
|
||||
}
|
||||
/**
|
||||
* Default Constructor
|
||||
*/
|
||||
public Error() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameterized Constructor
|
||||
*/
|
||||
public Error(String name, String message, String informationLink, String debugId) {
|
||||
this.name = name;
|
||||
this.message = message;
|
||||
this.informationLink = informationLink;
|
||||
this.debugId = debugId;
|
||||
}
|
||||
/**
|
||||
* Parameterized Constructor
|
||||
*/
|
||||
public Error(String name, String message, String informationLink, String debugId) {
|
||||
this.name = name;
|
||||
this.message = message;
|
||||
this.informationLink = informationLink;
|
||||
this.debugId = debugId;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "name: " + this.name + "\tmessage: " + this.message + "\tdetails: " + this.details + "\tdebug-id: " + this.debugId + "\tinformation-link: " + this.informationLink;
|
||||
}
|
||||
|
||||
/**
|
||||
* Human readable, unique name of the error.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Message describing the error.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional details of the error
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public List<ErrorDetails> getDetails() {
|
||||
return this.details;
|
||||
}
|
||||
|
||||
/**
|
||||
* URI for detailed information related to this error for the developer.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getInformationLink() {
|
||||
return this.informationLink;
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal internal identifier used for correlation purposes.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public String getDebugId() {
|
||||
return this.debugId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This property is not available publicly
|
||||
* PayPal internal error code.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("all")
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
public String toString() {
|
||||
return "name: " + this.name + "\tmessage: " + this.message + "\tdetails: " + this.details + "\tdebug-id: " + this.debugId + "\tinformation-link: " + this.informationLink;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Human readable, unique name of the error.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public Error setName(final String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Message describing the error.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public Error setMessage(final String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional details of the error
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public Error setDetails(final List<ErrorDetails> details) {
|
||||
this.details = details;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* URI for detailed information related to this error for the developer.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public Error setInformationLink(final String informationLink) {
|
||||
this.informationLink = informationLink;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* PayPal internal identifier used for correlation purposes.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public Error setDebugId(final String debugId) {
|
||||
this.debugId = debugId;
|
||||
return this;
|
||||
}
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated This property is not available publicly
|
||||
* PayPal internal error code.
|
||||
* @return this
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("all")
|
||||
public Error setCode(final String code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
|
||||
public List<ErrorDetails> getDetails() {
|
||||
return this.details;
|
||||
}
|
||||
|
||||
|
||||
public String getInformationLink() {
|
||||
return this.informationLink;
|
||||
}
|
||||
|
||||
|
||||
public String getDebugId() {
|
||||
return this.debugId;
|
||||
}
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
|
||||
public Error setName(final String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Error setMessage(final String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Error setDetails(final List<ErrorDetails> details) {
|
||||
this.details = details;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Error setInformationLink(final String informationLink) {
|
||||
this.informationLink = informationLink;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Error setDebugId(final String debugId) {
|
||||
this.debugId = debugId;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public Error setCode(final String code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,46 +19,30 @@ public class ErrorDetails {
|
||||
public ErrorDetails() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameterized Constructor
|
||||
*/
|
||||
|
||||
public ErrorDetails(String field, String issue) {
|
||||
this.field = field;
|
||||
this.issue = issue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the field that caused the error.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getField() {
|
||||
return this.field;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason for the error.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getIssue() {
|
||||
return this.issue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Name of the field that caused the error.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public ErrorDetails setField(final String field) {
|
||||
this.field = field;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason for the error.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public ErrorDetails setIssue(final String issue) {
|
||||
this.issue = issue;
|
||||
return this;
|
||||
|
||||
@@ -19,71 +19,46 @@ public class FmfDetails{
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* Type of filter.
|
||||
*/
|
||||
|
||||
public String getFilterType() {
|
||||
return this.filterType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter Identifier.
|
||||
*/
|
||||
|
||||
|
||||
public String getFilterId() {
|
||||
return this.filterId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the filter
|
||||
*/
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Description of the filter.
|
||||
*/
|
||||
|
||||
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Type of filter.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public FmfDetails setFilterType(final String filterType) {
|
||||
this.filterType = filterType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter Identifier.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public FmfDetails setFilterId(final String filterId) {
|
||||
this.filterId = filterId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the filter
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public FmfDetails setName(final String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Description of the filter.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public FmfDetails setDescription(final String description) {
|
||||
this.description = description;
|
||||
@@ -119,7 +94,6 @@ public class FmfDetails{
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public int hashCode() {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
|
||||
@@ -65,25 +65,16 @@ public class Order {
|
||||
public Order() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameterized Constructor
|
||||
*/
|
||||
|
||||
public Order(Amount amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Identifier of the order transaction.
|
||||
*/
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
|
||||
*/
|
||||
|
||||
public String getPurchaseUnitReferenceId() {
|
||||
return this.purchaseUnitReferenceId;
|
||||
@@ -91,109 +82,73 @@ public class Order {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Amount being collected.
|
||||
*/
|
||||
|
||||
|
||||
public Amount getAmount() {
|
||||
return this.amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* specifies payment mode of the transaction
|
||||
*/
|
||||
|
||||
|
||||
public String getPaymentMode() {
|
||||
return this.paymentMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the order transaction.
|
||||
*/
|
||||
|
||||
|
||||
public String getState() {
|
||||
return this.state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually. Only supported when the `payment_method` is set to `paypal`.
|
||||
*/
|
||||
|
||||
|
||||
public String getReasonCode() {
|
||||
return this.reasonCode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The level of seller protection in force for the transaction.
|
||||
*/
|
||||
|
||||
|
||||
public String getProtectionEligibility() {
|
||||
return this.protectionEligibility;
|
||||
}
|
||||
|
||||
/**
|
||||
* The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:<br> `ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.<br> `UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.<br> One or both of the allowed values can be returned.
|
||||
*/
|
||||
|
||||
|
||||
public String getProtectionEligibilityType() {
|
||||
return this.protectionEligibilityType;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the Payment resource that this transaction is based on.
|
||||
*/
|
||||
|
||||
|
||||
public String getParentPayment() {
|
||||
return this.parentPayment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
|
||||
*/
|
||||
|
||||
|
||||
public FmfDetails getFmfDetails() {
|
||||
return this.fmfDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was created in UTC ISO8601 format.
|
||||
*/
|
||||
|
||||
|
||||
public String getCreateTime() {
|
||||
return this.createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
*/
|
||||
|
||||
public String getUpdateTime() {
|
||||
return this.updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
|
||||
public List<Links> getLinks() {
|
||||
return this.links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier of the order transaction.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setId(final String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifier to the purchase unit associated with this object. Obsolete. Use one in cart_base.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setPurchaseUnitReferenceId(final String purchaseUnitReferenceId) {
|
||||
this.purchaseUnitReferenceId = purchaseUnitReferenceId;
|
||||
@@ -202,112 +157,70 @@ public class Order {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Amount being collected.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
public Order setAmount(final Amount amount) {
|
||||
this.amount = amount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* specifies payment mode of the transaction
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setPaymentMode(final String paymentMode) {
|
||||
this.paymentMode = paymentMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the order transaction.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setState(final String state) {
|
||||
this.state = state;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason code for the transaction state being Pending or Reversed. This field will replace pending_reason field eventually. Only supported when the `payment_method` is set to `paypal`.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setReasonCode(final String reasonCode) {
|
||||
this.reasonCode = reasonCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The level of seller protection in force for the transaction.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setProtectionEligibility(final String protectionEligibility) {
|
||||
this.protectionEligibility = protectionEligibility;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The kind of seller protection in force for the transaction. This property is returned only when the `protection_eligibility` property is set to `ELIGIBLE`or `PARTIALLY_ELIGIBLE`. Only supported when the `payment_method` is set to `paypal`. Allowed values:<br> `ITEM_NOT_RECEIVED_ELIGIBLE`- Sellers are protected against claims for items not received.<br> `UNAUTHORIZED_PAYMENT_ELIGIBLE`- Sellers are protected against claims for unauthorized payments.<br> One or both of the allowed values can be returned.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setProtectionEligibilityType(final String protectionEligibilityType) {
|
||||
this.protectionEligibilityType = protectionEligibilityType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the Payment resource that this transaction is based on.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setParentPayment(final String parentPayment) {
|
||||
this.parentPayment = parentPayment;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fraud Management Filter (FMF) details applied for the payment that could result in accept/deny/pending action.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setFmfDetails(final FmfDetails fmfDetails) {
|
||||
this.fmfDetails = fmfDetails;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was created in UTC ISO8601 format.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setCreateTime(final String createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time the resource was last updated in UTC ISO8601 format.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
public Order setUpdateTime(final String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Order setLinks(final List<Links> links) {
|
||||
this.links = links;
|
||||
return this;
|
||||
|
||||
@@ -40,116 +40,73 @@ public class Payee {
|
||||
public Payee() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receive PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getEmail() {
|
||||
return this.email;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encrypted PayPal account identifier for the Payee.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getMerchantId() {
|
||||
return this.merchantId;
|
||||
}
|
||||
|
||||
/**
|
||||
* First Name of the Payee.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getFirstName() {
|
||||
return this.firstName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Last Name of the Payee.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getLastName() {
|
||||
return this.lastName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unencrypted PayPal account Number of the Payee
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getAccountNumber() {
|
||||
return this.accountNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information related to the Payee.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Phone getPhone() {
|
||||
return this.phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Email Address associated with the Payee's PayPal Account. If the provided email address is not associated with any PayPal Account, the payee can only receive PayPal Wallet Payments. Direct Credit Card Payments will be denied due to card compliance requirements.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Payee setEmail(final String email) {
|
||||
this.email = email;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encrypted PayPal account identifier for the Payee.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Payee setMerchantId(final String merchantId) {
|
||||
this.merchantId = merchantId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* First Name of the Payee.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Payee setFirstName(final String firstName) {
|
||||
this.firstName = firstName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Last Name of the Payee.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Payee setLastName(final String lastName) {
|
||||
this.lastName = lastName;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unencrypted PayPal account Number of the Payee
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Payee setAccountNumber(final String accountNumber) {
|
||||
this.accountNumber = accountNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Information related to the Payee.
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Payee setPhone(final Phone phone) {
|
||||
this.phone = phone;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (!(o instanceof Payee)) return false;
|
||||
@@ -177,13 +134,12 @@ public class Payee {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof Payee;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public int hashCode() {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
|
||||
@@ -26,70 +26,46 @@ public class Phone{
|
||||
public Phone() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameterized Constructor
|
||||
*/
|
||||
|
||||
public Phone(String countryCode, String nationalNumber) {
|
||||
this.countryCode = countryCode;
|
||||
this.nationalNumber = nationalNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Country code (from in E.164 format)
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getCountryCode() {
|
||||
return this.countryCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* In-country phone number (from in E.164 format)
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getNationalNumber() {
|
||||
return this.nationalNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Phone extension
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getExtension() {
|
||||
return this.extension;
|
||||
}
|
||||
|
||||
/**
|
||||
* Country code (from in E.164 format)
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Phone setCountryCode(final String countryCode) {
|
||||
this.countryCode = countryCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* In-country phone number (from in E.164 format)
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Phone setNationalNumber(final String nationalNumber) {
|
||||
this.nationalNumber = nationalNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Phone extension
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public Phone setExtension(final String extension) {
|
||||
this.extension = extension;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (!(o instanceof Phone)) return false;
|
||||
@@ -108,13 +84,11 @@ public class Phone{
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof Phone;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public int hashCode() {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
|
||||
@@ -22,44 +22,30 @@ public class RedirectUrls{
|
||||
public RedirectUrls() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Url where the payer would be redirected to after approving the payment. **Required for PayPal account payments.**
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getReturnUrl() {
|
||||
return this.returnUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Url where the payer would be redirected to after canceling the payment. **Required for PayPal account payments.**
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public String getCancelUrl() {
|
||||
return this.cancelUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Url where the payer would be redirected to after approving the payment. **Required for PayPal account payments.**
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public RedirectUrls setReturnUrl(final String returnUrl) {
|
||||
this.returnUrl = returnUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Url where the payer would be redirected to after canceling the payment. **Required for PayPal account payments.**
|
||||
* @return this
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public RedirectUrls setCancelUrl(final String cancelUrl) {
|
||||
this.cancelUrl = cancelUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) return true;
|
||||
if (!(o instanceof RedirectUrls)) return false;
|
||||
@@ -75,13 +61,11 @@ public class RedirectUrls{
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof RedirectUrls;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public int hashCode() {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
|
||||
@@ -64,233 +64,152 @@ public class Refund {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ID of the refund transaction. 17 characters max.
|
||||
*/
|
||||
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Details including both refunded amount (to payer) and refunded fee (to payee). 10 characters max.
|
||||
*/
|
||||
|
||||
|
||||
public Amount getAmount() {
|
||||
return this.amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the refund.
|
||||
*/
|
||||
|
||||
|
||||
public String getState() {
|
||||
return this.state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason description for the Sale transaction being refunded.
|
||||
*/
|
||||
|
||||
public String getReason() {
|
||||
return this.reason;
|
||||
}
|
||||
|
||||
/**
|
||||
* Your own invoice or tracking ID number. Character length and limitations: 127 single-byte alphanumeric characters.
|
||||
*/
|
||||
|
||||
|
||||
public String getInvoiceNumber() {
|
||||
return this.invoiceNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the Sale transaction being refunded.
|
||||
*/
|
||||
|
||||
|
||||
public String getSaleId() {
|
||||
return this.saleId;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the sale transaction being refunded.
|
||||
*/
|
||||
|
||||
public String getCaptureId() {
|
||||
return this.captureId;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the payment resource on which this transaction is based.
|
||||
*/
|
||||
|
||||
|
||||
public String getParentPayment() {
|
||||
return this.parentPayment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Description of what is being refunded for.
|
||||
*/
|
||||
|
||||
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time of refund as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||
*/
|
||||
|
||||
|
||||
public String getCreateTime() {
|
||||
return this.createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time that the resource was last updated.
|
||||
*/
|
||||
|
||||
public String getUpdateTime() {
|
||||
return this.updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* The reason code for the refund state being pending
|
||||
*/
|
||||
|
||||
|
||||
public String getReasonCode() {
|
||||
return this.reasonCode;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
|
||||
public List<Links> getLinks() {
|
||||
return this.links;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the refund transaction. 17 characters max.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
public Refund setId(final String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Details including both refunded amount (to payer) and refunded fee (to payee). 10 characters max.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setAmount(final Amount amount) {
|
||||
this.amount = amount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* State of the refund.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setState(final String state) {
|
||||
this.state = state;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reason description for the Sale transaction being refunded.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setReason(final String reason) {
|
||||
this.reason = reason;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Your own invoice or tracking ID number. Character length and limitations: 127 single-byte alphanumeric characters.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setInvoiceNumber(final String invoiceNumber) {
|
||||
this.invoiceNumber = invoiceNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the Sale transaction being refunded.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
public Refund setSaleId(final String saleId) {
|
||||
this.saleId = saleId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the sale transaction being refunded.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setCaptureId(final String captureId) {
|
||||
this.captureId = captureId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* ID of the payment resource on which this transaction is based.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setParentPayment(final String parentPayment) {
|
||||
this.parentPayment = parentPayment;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Description of what is being refunded for.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setDescription(final String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time of refund as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6).
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setCreateTime(final String createTime) {
|
||||
this.createTime = createTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Time that the resource was last updated.
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setUpdateTime(final String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The reason code for the refund state being pending
|
||||
* @return this
|
||||
*/
|
||||
|
||||
public Refund setReasonCode(final String reasonCode) {
|
||||
this.reasonCode = reasonCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return this
|
||||
*/
|
||||
|
||||
|
||||
public Refund setLinks(final List<Links> links) {
|
||||
this.links = links;
|
||||
|
||||
Reference in New Issue
Block a user