├── test ├── setup.php └── Integration │ └── Gateways │ ├── GpApiConnector │ └── FileProcessing │ │ └── FilesToUpload │ │ └── 20231127Tokenization100records.csv.encrypted.txt │ ├── Terminals │ ├── UPA │ │ └── samples │ │ │ ├── download.png │ │ │ ├── brand_logo_test.png │ │ │ └── UDDataFile.html │ ├── HPA │ │ └── sampleimages │ │ │ ├── image_500_500.jpg │ │ │ ├── hpa_logo_iSC250_272_480.jpg │ │ │ └── hpa_banner_iSC250_60_480.jpg │ └── RequestIdProvider.php │ └── ProPay │ └── TestData │ └── ChargebackDispute.jpg ├── metadata.xml ├── examples ├── gp-api │ ├── google-pay │ │ ├── styles.css │ │ └── index.html │ ├── alipay │ │ └── styles.css │ └── end-to-end │ │ └── styles.css ├── gp-ecom │ └── 3DS2-Challenge │ │ ├── with-GP-js-library │ │ └── ThreeDSecure2 │ │ │ └── InitiateAuthentication.php │ │ └── challengeNotification.php └── portico │ ├── end-to-end │ └── assets │ │ └── images │ │ ├── cvv.png │ │ ├── cvv1.png │ │ ├── cvv2.png │ │ ├── ss-cvv@2x.png │ │ ├── ss-shield-ie.png │ │ ├── ss-shield@1x.png │ │ ├── ss-shield@2x.png │ │ ├── ss-saved-amex@2x.png │ │ ├── ss-saved-jcb@2x.png │ │ ├── ss-saved-visa@2x.png │ │ ├── ss-saved-mastercard.png │ │ ├── ss-inputcard-blank@2x.png │ │ ├── ss-saved-discover@2x.png │ │ ├── ss-savedcards-amex@2x.png │ │ └── ss-saved-mastercard@2x.png │ ├── point-of-sale │ └── e3-swipe │ │ └── assets │ │ ├── apples.png │ │ ├── bananas.png │ │ └── oranges.png │ └── gift │ └── index.php ├── phpcs.xml ├── src ├── PaymentMethods │ ├── Interfaces │ │ ├── ICardData.php │ │ ├── ISecureCheck.php │ │ ├── ITrackData.php │ │ ├── IVoidable.php │ │ ├── IEncryptable.php │ │ ├── IPinProtected.php │ │ ├── IVerifyable.php │ │ ├── IEditable.php │ │ ├── IAuthable.php │ │ ├── IChargable.php │ │ ├── IPaymentMethod.php │ │ ├── IPrePayable.php │ │ ├── IRefundable.php │ │ ├── IReversable.php │ │ ├── IBalanceable.php │ │ ├── ISecure3d.php │ │ └── ITokenizable.php │ └── Bank.php ├── Terminals │ ├── Abstractions │ │ ├── IDeviceResponse.php │ │ ├── IDeviceScreen.php │ │ ├── IBatchCloseResponse.php │ │ ├── IResponseSubGroup.php │ │ ├── ITerminalReport.php │ │ ├── ISignatureResponse.php │ │ ├── IDeviceMessage.php │ │ ├── IRequestSubGroup.php │ │ ├── IDeviceResponseHandler.php │ │ ├── ISAFResponse.php │ │ ├── ILogManagement.php │ │ ├── IDeviceCommInterface.php │ │ └── IRequestIdProvider.php │ ├── Entities │ │ ├── Button.php │ │ ├── ThreeDesDukpt.php │ │ ├── HostData.php │ │ ├── TrackData.php │ │ ├── PromptMessages.php │ │ ├── PromptButtons.php │ │ ├── UpaConfigContent.php │ │ ├── PANDetails.php │ │ ├── MessageLines.php │ │ ├── ScanData.php │ │ ├── PrintData.php │ │ └── PromptData.php │ ├── Enums │ │ ├── StopBits.php │ │ ├── DataBits.php │ │ ├── PromptType.php │ │ ├── DebugLogsOutput.php │ │ ├── Parity.php │ │ ├── DownloadType.php │ │ ├── BatchReportType.php │ │ ├── InputAlignment.php │ │ ├── ReportOutput.php │ │ ├── DisplayOption.php │ │ ├── ApplicationCryptogramType.php │ │ ├── Reinitialize.php │ │ ├── PromptForManualEntryPassword.php │ │ ├── LogFileIndicator.php │ │ ├── TextFormat.php │ │ ├── BaudRate.php │ │ ├── DownloadEnvironment.php │ │ ├── SafUpload.php │ │ ├── MerchantDecision.php │ │ ├── SafDelete.php │ │ ├── SafReportSummary.php │ │ ├── HostDecision.php │ │ ├── SafMode.php │ │ ├── AcquisitionType.php │ │ ├── DeviceSettings.php │ │ ├── CurrencyType.php │ │ ├── DebugLevel.php │ │ ├── UDFileTypes.php │ │ ├── ConnectionModes.php │ │ ├── TerminalReportType.php │ │ ├── DeviceConfigType.php │ │ ├── DownloadTime.php │ │ ├── SummaryType.php │ │ ├── SAFReportType.php │ │ ├── TerminalCardType.php │ │ └── DeviceType.php │ ├── UPA │ │ ├── Entities │ │ │ ├── POSData.php │ │ │ ├── CancelParameters.php │ │ │ ├── Enums │ │ │ │ ├── UpaSAFType.php │ │ │ │ └── UpaSearchCriteria.php │ │ │ ├── SignatureData.php │ │ │ └── TokenInfo.php │ │ ├── Responses │ │ │ ├── PinDUKPTResponse.php │ │ │ ├── OpenTab.php │ │ │ ├── BatchTransaction.php │ │ │ ├── BatchTransactionList.php │ │ │ └── SafReport.php │ │ └── UpaMessageType.php │ ├── HPA │ │ └── Entities │ │ │ ├── Enums │ │ │ └── HpaMessageFormat.php │ │ │ ├── SendFileData.php │ │ │ └── LineItem.php │ ├── Genius │ │ └── Entities │ │ │ └── Enums │ │ │ ├── HttpMethod.php │ │ │ ├── TransactionIdType.php │ │ │ └── MitcRequestType.php │ ├── Diamond │ │ └── Entities │ │ │ ├── Enums │ │ │ ├── AuthorizationType.php │ │ │ ├── TransactionResult.php │ │ │ ├── AuthorizationMethod.php │ │ │ ├── CardSource.php │ │ │ ├── DiamondCloudSearchCriteria.php │ │ │ └── TransactionTypeResponse.php │ │ │ └── DiamondCloudRequest.php │ ├── PAX │ │ ├── Entities │ │ │ └── Enums │ │ │ │ ├── PaxEntryMode.php │ │ │ │ └── PaxSearchCriteria.php │ │ ├── Responses │ │ │ ├── DebitResponse.php │ │ │ ├── EBTResponse.php │ │ │ ├── CreditResponse.php │ │ │ ├── GiftResponse.php │ │ │ ├── PaxLocalReportResponse.php │ │ │ └── SafDeleteResponse.php │ │ └── SubGroups │ │ │ ├── AvsRequest.php │ │ │ ├── CashierSubGroup.php │ │ │ ├── CashierResponse.php │ │ │ ├── AvsResponse.php │ │ │ └── CommercialRequest.php │ ├── SummaryResponse.php │ ├── DeviceResponse.php │ └── ValidationRequest.php ├── Entities │ ├── BillPay │ │ ├── LoadSecurePayResponse.php │ │ ├── ConvenienceFeeResponse.php │ │ ├── TokenResponse.php │ │ └── LoadHostedPaymentResponse.php │ ├── Enums │ │ ├── Channel.php │ │ ├── FundsStatus.php │ │ ├── CaptureMode.php │ │ ├── EbtCardType.php │ │ ├── BillPresentment.php │ │ ├── ManualEntryMethod.php │ │ ├── MessageVersion.php │ │ ├── Risk.php │ │ ├── PaymentProvider.php │ │ ├── ActionSortProperty.php │ │ ├── DccRateType.php │ │ ├── PayByLinkSortProperty.php │ │ ├── PaymentType.php │ │ ├── UserType.php │ │ ├── HppVersion.php │ │ ├── HostedPaymentMethods.php │ │ ├── SortDirection.php │ │ ├── DccProcessor.php │ │ ├── Environment.php │ │ ├── MerchantAccountsSortProperty.php │ │ ├── NetGrossIndicator.php │ │ ├── RecurringType.php │ │ ├── RemittanceReferenceType.php │ │ ├── Target.php │ │ ├── AccountType.php │ │ ├── BankPaymentType.php │ │ ├── CheckType.php │ │ ├── CreditDebitIndicator.php │ │ ├── EntryMethod.php │ │ ├── MerchantAccountStatus.php │ │ ├── FileProcessingActionType.php │ │ ├── GiftEntryMethod.php │ │ ├── PaymentMethodUsageMode.php │ │ ├── UserLevelRelationship.php │ │ ├── AliasAction.php │ │ ├── BNPLType.php │ │ ├── CommercialIndicator.php │ │ ├── ShaHashType.php │ │ ├── StoredPaymentMethodSortProperty.php │ │ ├── ReorderIndicator.php │ │ ├── DigitalWalletTokenFormat.php │ │ ├── SdkInterface.php │ │ ├── MobilePaymentMethodType.php │ │ ├── TaxType.php │ │ ├── AddressType.php │ │ ├── BillingLoadType.php │ │ ├── InitialPaymentMethod.php │ │ ├── MethodUrlCompletion.php │ │ ├── RecurringSequence.php │ │ ├── BNPLShippingMethod.php │ │ ├── Secure3dVersion.php │ │ ├── TimeZoneConversion.php │ │ ├── EmvLastChipRead.php │ │ ├── StoredCredentialSequence.php │ │ ├── DecoupledFlowRequest.php │ │ ├── FraudFilterMode.php │ │ ├── PhoneNumberType.php │ │ ├── PreOrderIndicator.php │ │ ├── CvnPresenceIndicator.php │ │ ├── InquiryType.php │ │ ├── UsableBalanceMode.php │ │ ├── EncyptedMobileType.php │ │ ├── MessageCategory.php │ │ ├── SuspiciousAccountActivity.php │ │ ├── UserStatus.php │ │ ├── DocumentCategory.php │ │ ├── PersonFunctions.php │ │ ├── PaymentSchedule.php │ │ ├── TrackNumber.php │ │ ├── SecCode.php │ │ ├── DepositSortProperty.php │ │ ├── ExemptionReason.php │ │ ├── PayByLinkStatus.php │ │ ├── ExtraChargeType.php │ │ ├── RiskAssessmentStatus.php │ │ ├── StoredCredentialInitiator.php │ │ ├── PaymentMethodFunction.php │ │ ├── PaymentMethodProgram.php │ │ ├── SdkUiType.php │ │ ├── BlockCardType.php │ │ ├── DeliveryTimeFrame.php │ │ ├── AuthenticationSource.php │ │ ├── TransactionSortProperty.php │ │ ├── PayByLinkType.php │ │ ├── CardDataOutputCapability.php │ │ ├── DepositStatus.php │ │ ├── HostedPaymentType.php │ │ ├── CardType.php │ │ ├── MerchantCategory.php │ │ ├── DisputeStatus.php │ │ ├── FileType.php │ │ ├── StoredCredentialReason.php │ │ ├── Region.php │ │ ├── TaxCategory.php │ │ ├── CustomerDocumentType.php │ │ ├── LodgingItemType.php │ │ ├── RecurringAuthorizationType.php │ │ ├── PriorAuthenticationMethod.php │ │ ├── TerminalOutputCapability.php │ │ ├── ChallengeWindowSize.php │ │ ├── FraudFilterResult.php │ │ ├── ExemptStatus.php │ │ ├── UcafIndicator.php │ │ ├── GatewayProvider.php │ │ ├── AgeIndicator.php │ │ ├── OrderTransactionType.php │ │ ├── ScheduleFrequency.php │ │ ├── MerchantAccountType.php │ │ ├── PaymentMethodType.php │ │ ├── EcommerceChannel.php │ │ ├── IntervalToExpire.php │ │ ├── EmvFallbackCondition.php │ │ ├── AuthenticationRequestType.php │ │ ├── ShippingMethod.php │ │ ├── PaymentEntryMode.php │ │ ├── EmvChipCondition.php │ │ ├── TransactionLanguage.php │ │ ├── CustomerAuthenticationMethod.php │ │ ├── EcommerceIndicator.php │ │ ├── Secure3dStatus.php │ │ ├── ColorDepth.php │ │ ├── PaymentMethodName.php │ │ ├── DisputeStage.php │ │ ├── ProPayAccountStatus.php │ │ ├── CardDataSource.php │ │ ├── PinCaptureCapability.php │ │ ├── CardHolderAuthenticationEntity.php │ │ ├── DisputeSortProperty.php │ │ ├── PaymentDataSourceType.php │ │ ├── HPPAllowedPaymentMethods.php │ │ ├── CardHolderAuthenticationCapability.php │ │ ├── TimeZone.php │ │ ├── HPPTypes.php │ │ ├── StatusChangeReason.php │ │ ├── HPPStorageModes.php │ │ └── MerchantInitiatedRequestType.php │ ├── Terms.php │ ├── GpApi │ │ ├── DTO │ │ │ ├── Authentication.php │ │ │ ├── Card.php │ │ │ └── PaymentMethod.php │ │ ├── GpApiAccount.php │ │ └── PagedResult.php │ ├── PayFac │ │ ├── OwnerDetailsResponseData.php │ │ ├── AccountBalanceResponseData.php │ │ ├── UserReference.php │ │ ├── FlashFundsPaymentCardData.php │ │ ├── DeviceAttributeInfo.php │ │ ├── DeviceOrder.php │ │ ├── BeneficialOwnerData.php │ │ ├── GrossBillingInformation.php │ │ ├── ThreatRiskData.php │ │ ├── DeviceDetails.php │ │ ├── SingleSignOnData.php │ │ └── SignificantOwnerData.php │ ├── DisputeDocument.php │ ├── BlockedCardType.php │ ├── IInstallmentEntity.php │ ├── FileUploaded.php │ ├── Action.php │ ├── Dispute.php │ ├── FundsData.php │ ├── LodgingItems.php │ ├── UserAccount.php │ ├── ThirdPartyResponse.php │ ├── OrderDetails.php │ ├── Reporting │ │ ├── AltPaymentProcessorInfo.php │ │ ├── BaseSummary.php │ │ ├── TransactionList.php │ │ ├── MerchantSummary.php │ │ ├── AltPaymentData.php │ │ └── StoredPaymentMethodSummary.php │ ├── IRequestBuilder.php │ ├── BNPLResponse.php │ ├── IRequestLogger.php │ ├── PersonList.php │ ├── Exceptions │ │ ├── NotImplementedException.php │ │ ├── UnsupportedTransactionException.php │ │ ├── MessageException.php │ │ ├── BuilderException.php │ │ ├── ArgumentException.php │ │ ├── ConfigurationException.php │ │ └── ApiException.php │ ├── InstallmentData.php │ ├── FileProcessor.php │ ├── IWebProxy.php │ ├── FraudRule.php │ ├── AddressCollection.php │ ├── FileList.php │ ├── MessageExtension.php │ ├── PhoneNumber.php │ ├── TransferFundsAccountCollection.php │ ├── BatchTotals.php │ ├── Document.php │ ├── UserLinks.php │ ├── CustomerDocument.php │ ├── PaymentMethodList.php │ ├── PaymentStatistics.php │ ├── Request.php │ ├── TransactionApi │ │ ├── TransactionApiData.php │ │ └── TransactionApiRequest.php │ ├── MobileData.php │ ├── FraudManagementResponse.php │ ├── CustomWebProxy.php │ ├── Product.php │ ├── BrowserData.php │ ├── AdditionalTaxDetails.php │ └── StoredCredential.php ├── Gateways │ ├── BillPay │ │ ├── Responses │ │ │ ├── PreloadBillsResponse.php │ │ │ ├── CustomerAccountResponse.php │ │ │ ├── SingleSignOnAccountResponse.php │ │ │ ├── UpdateTokenResponse.php │ │ │ ├── TokenRequestResponse.php │ │ │ ├── BillingRequestResponse.php │ │ │ ├── CommitPreloadedBillsResponse.php │ │ │ ├── CreateCustomerAccountResponse.php │ │ │ ├── SecurePayResponse.php │ │ │ └── ConvenienceFeeRequestResponse.php │ │ └── Requests │ │ │ ├── MakeQuickPayBlindPaymentReturnTokenRequest.php │ │ │ ├── MakePaymentRequest.php │ │ │ ├── MakePaymentReturnTokenRequest.php │ │ │ └── MakeBlindPaymentReturnTokenRequest.php │ ├── Interfaces │ │ ├── IDeviceCloudService.php │ │ ├── IBillPayResponse.php │ │ ├── IFileProcessingService.php │ │ └── IBillingProvider.php │ ├── IRecurringService.php │ ├── IInstallmentService.php │ ├── GatewayResponse.php │ ├── IAccessTokenProvider.php │ ├── IOpenBankingProvider.php │ ├── IFraudCheckService.php │ ├── ISecure3dProvider.php │ └── IPayFacProvider.php ├── Utils │ ├── AmountUtils.php │ ├── EnumUtils.php │ └── ReverseEnumMap.php ├── Services │ ├── BatchService.php │ ├── FraudService.php │ ├── InstallmentService.php │ └── FileProcessingService.php └── Builders │ └── RequestBuilder │ └── GpEcom │ └── GpEcomRequestBuilder.php ├── .gitignore ├── .travis.yml └── docs-config.php /test/setup.php: -------------------------------------------------------------------------------- 1 | 2 | 14.0.4 3 | -------------------------------------------------------------------------------- /test/Integration/Gateways/GpApiConnector/FileProcessing/FilesToUpload/20231127Tokenization100records.csv.encrypted.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/gp-api/google-pay/styles.css: -------------------------------------------------------------------------------- 1 | .error { 2 | color: red; 3 | } 4 | 5 | .hide { 6 | display: none; 7 | } 8 | -------------------------------------------------------------------------------- /examples/gp-ecom/3DS2-Challenge/with-GP-js-library/ThreeDSecure2/InitiateAuthentication.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | ./src 4 | 5 | 6 | -------------------------------------------------------------------------------- /examples/portico/end-to-end/assets/images/cvv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globalpayments/php-sdk/HEAD/examples/portico/end-to-end/assets/images/cvv.png -------------------------------------------------------------------------------- /examples/portico/end-to-end/assets/images/cvv1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globalpayments/php-sdk/HEAD/examples/portico/end-to-end/assets/images/cvv1.png -------------------------------------------------------------------------------- /examples/portico/end-to-end/assets/images/cvv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/globalpayments/php-sdk/HEAD/examples/portico/end-to-end/assets/images/cvv2.png -------------------------------------------------------------------------------- /src/PaymentMethods/Interfaces/ICardData.php: -------------------------------------------------------------------------------- 1 | id = $id; 13 | $this->name = $name; 14 | } 15 | } -------------------------------------------------------------------------------- /src/Terminals/Entities/HostData.php: -------------------------------------------------------------------------------- 1 | id = $id; 14 | $this->name = $name; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Terminals/Genius/Entities/Enums/TransactionIdType.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PIA TEST 5 | 6 | 7 |
PIA TESTING
8 | 9 | 17 | -------------------------------------------------------------------------------- /test/Integration/Gateways/Terminals/RequestIdProvider.php: -------------------------------------------------------------------------------- 1 | token; 15 | } 16 | 17 | public function setToken(string $token) 18 | { 19 | $this->token = $token; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Entities/Enums/PriorAuthenticationMethod.php: -------------------------------------------------------------------------------- 1 | offsetSet($type, $address); 14 | } 15 | 16 | public function get(string $type) : Address 17 | { 18 | return $this->offsetGet($type); 19 | } 20 | } -------------------------------------------------------------------------------- /src/Entities/FileList.php: -------------------------------------------------------------------------------- 1 | files = $file; 12 | } 13 | 14 | public function add(FileUploaded $fileUploaded) : void 15 | { 16 | $this->files[] = $fileUploaded; 17 | } 18 | 19 | public function all() : array 20 | { 21 | return $this->files; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Entities/MessageExtension.php: -------------------------------------------------------------------------------- 1 | list = $button; 12 | } 13 | 14 | public function add(Button $button) : void 15 | { 16 | $this->list[] = $button; 17 | } 18 | 19 | public function all() : array 20 | { 21 | return $this->list; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Entities/Enums/GatewayProvider.php: -------------------------------------------------------------------------------- 1 | creditCard = new CreditCardData(); 16 | $this->cardholderAddress = new Address(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Terminals/Diamond/Entities/Enums/TransactionTypeResponse.php: -------------------------------------------------------------------------------- 1 | 16 | window.parent.postMessage({ data: " . isset($decodedString) ? htmlspecialchars($decodedString) : "" . "}, window.location.origin); 17 | "; 18 | -------------------------------------------------------------------------------- /src/Entities/PayFac/DeviceAttributeInfo.php: -------------------------------------------------------------------------------- 1 | countryCode = $countryCode; 18 | $this->number = $number; 19 | $this->type = $type; 20 | } 21 | } -------------------------------------------------------------------------------- /src/Terminals/Enums/DownloadTime.php: -------------------------------------------------------------------------------- 1 | get($value); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Entities/TransferFundsAccountCollection.php: -------------------------------------------------------------------------------- 1 | offsetSet($id, $transfer); 14 | } 15 | 16 | public function get(string $id) : FundsAccountDetails 17 | { 18 | return $this->offsetGet($id); 19 | } 20 | } -------------------------------------------------------------------------------- /src/Terminals/Enums/SummaryType.php: -------------------------------------------------------------------------------- 1 | files() 9 | ->name('*.php') 10 | ->in($dir = __DIR__ . '/src'); 11 | 12 | return new Sami($iterator, [ 13 | 'title' => 'GlobalPayments\Api', 14 | 'build_dir' => dirname($dir) . '/docs', 15 | 'cache_dir' => dirname($dir) . '/docs-cache', 16 | 'remote_repository' => new GitHubRemoteRepository('globalpayments/php-sdk', dirname($dir)), 17 | ]); 18 | -------------------------------------------------------------------------------- /src/Entities/BatchTotals.php: -------------------------------------------------------------------------------- 1 | [ 14 | Target::Transit => 'ICC_TERMINAL_ERROR' 15 | ], 16 | self::NO_CANDIDATE_LIST => [ 17 | Target::Transit => 'NO_CANDIDATE_LIST' 18 | ] 19 | ]; 20 | } -------------------------------------------------------------------------------- /src/Gateways/BillPay/Requests/MakeQuickPayBlindPaymentReturnTokenRequest.php: -------------------------------------------------------------------------------- 1 | responseCode = $this->response->getString("a:ResponseCode"); 14 | $result->responseMessage = $this->getFirstResponseMessage($this->response); 15 | 16 | return $result; 17 | } 18 | } -------------------------------------------------------------------------------- /src/Entities/Document.php: -------------------------------------------------------------------------------- 1 | list = $transaction; 12 | } 13 | 14 | public function add(TransactionSummary $transactionSummary) : void 15 | { 16 | $this->list[] = $transactionSummary; 17 | } 18 | 19 | public function all() : array 20 | { 21 | return $this->list; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Entities/Enums/EmvChipCondition.php: -------------------------------------------------------------------------------- 1 | reference = $reference; 21 | $this->issuer = $issuer; 22 | $this->type = $type; 23 | } 24 | } -------------------------------------------------------------------------------- /src/Entities/Enums/CustomerAuthenticationMethod.php: -------------------------------------------------------------------------------- 1 | list = $transaction; 12 | } 13 | 14 | public function add(BatchTransaction $transactionSummary) : void 15 | { 16 | $this->list[] = $transactionSummary; 17 | } 18 | 19 | public function all() : array 20 | { 21 | return $this->list; 22 | } 23 | } -------------------------------------------------------------------------------- /src/Utils/ReverseEnumMap.php: -------------------------------------------------------------------------------- 1 | getConstants() as $constant => $value) { 15 | $this->map[$value] = $constant; 16 | } 17 | } 18 | 19 | public function get($value) 20 | { 21 | return isset($this->map[$value]) ? $this->map[$value] : ''; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Entities/Enums/EcommerceIndicator.php: -------------------------------------------------------------------------------- 1 | endpoint = $endpoint; 17 | $this->httpVerb = $httpVerb; 18 | $this->requestBody = $requestBody; 19 | $this->queryParams = $queryParams; 20 | } 21 | } -------------------------------------------------------------------------------- /examples/portico/gift/index.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | GiftCard Example 9 | 10 | 11 |
12 | Card Number:
13 | 14 |

15 | 16 |
17 | 18 | -------------------------------------------------------------------------------- /src/Entities/Enums/ColorDepth.php: -------------------------------------------------------------------------------- 1 | paymentIdentifier; 16 | } 17 | 18 | public function setPaymentIdentifier(string $paymentIdentifier) 19 | { 20 | $this->paymentIdentifier = $paymentIdentifier; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Gateways/ISecure3dProvider.php: -------------------------------------------------------------------------------- 1 | */ 13 | public array $approved = []; 14 | /** @var array */ 15 | public array $pending = []; 16 | /** @var array */ 17 | public array $decline = []; 18 | } -------------------------------------------------------------------------------- /src/Gateways/BillPay/Requests/MakePaymentRequest.php: -------------------------------------------------------------------------------- 1 | responseCode = $this->response->getString("a:ResponseCode"); 14 | $result->responseMessage = $this->getFirstResponseMessage($this->response); 15 | $result->token = $this->response->getString("a:Token"); 16 | 17 | return $result; 18 | } 19 | } -------------------------------------------------------------------------------- /src/Terminals/PAX/Entities/Enums/PaxSearchCriteria.php: -------------------------------------------------------------------------------- 1 | withBatchReference($batchReference); 16 | } 17 | 18 | return $response->execute(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Entities/Exceptions/ArgumentException.php: -------------------------------------------------------------------------------- 1 | setIsSuccessful($this->response->getBool("a:isSuccessful")); 14 | $result->setResponseCode($this->response->getString("a:ResponseCode")); 15 | $result->setResponseMessage($this->getFirstResponseMessage($this->response)); 16 | 17 | return $result; 18 | } 19 | } -------------------------------------------------------------------------------- /src/Entities/Enums/CardDataSource.php: -------------------------------------------------------------------------------- 1 | grossSettleAddress = new Address(); 19 | $this->grossSettleBankData = new BankAccountData(); 20 | $this->grossSettleCreditCardData = new CreditCardData(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Gateways/BillPay/Requests/MakePaymentReturnTokenRequest.php: -------------------------------------------------------------------------------- 1 | transactions = new TransactionList(); 22 | } 23 | } -------------------------------------------------------------------------------- /src/Entities/Enums/PinCaptureCapability.php: -------------------------------------------------------------------------------- 1 | setIsSuccessful($this->response->getBool("a:isSuccessful")); 14 | $result->setResponseCode($this->getFirstResponseCode($this->response)); 15 | $result->setResponseMessage($this->getFirstResponseMessage($this->response)); 16 | 17 | return $result; 18 | } 19 | } -------------------------------------------------------------------------------- /src/Terminals/PAX/Responses/DebitResponse.php: -------------------------------------------------------------------------------- 1 | mapResponse($messageReader); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Terminals/PAX/Responses/EBTResponse.php: -------------------------------------------------------------------------------- 1 | mapResponse($messageReader); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Gateways/IPayFacProvider.php: -------------------------------------------------------------------------------- 1 | mapResponse($messageReader); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Entities/Enums/CardHolderAuthenticationEntity.php: -------------------------------------------------------------------------------- 1 | withPaymentMethod($paymentMethod); 20 | } 21 | } -------------------------------------------------------------------------------- /src/Gateways/BillPay/Requests/MakeBlindPaymentReturnTokenRequest.php: -------------------------------------------------------------------------------- 1 | execute(); 20 | return $response; 21 | } 22 | } -------------------------------------------------------------------------------- /src/Entities/TransactionApi/TransactionApiData.php: -------------------------------------------------------------------------------- 1 | mapResponse($messageReader); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Gateways/BillPay/Responses/CreateCustomerAccountResponse.php: -------------------------------------------------------------------------------- 1 | setIsSuccessful($this->response->getBool("a:isSuccessful")); 14 | $result->setResponseCode($this->response->getString("a:ResponseCode")); 15 | $result->setResponseMessage($this->getFirstResponseMessage($this->response)); 16 | $result->setToken($this->response->getString("a:Token")); 17 | 18 | return $result; 19 | } 20 | } -------------------------------------------------------------------------------- /src/Terminals/DeviceResponse.php: -------------------------------------------------------------------------------- 1 | */ 20 | public $sdkUiTypes; 21 | 22 | public $ephemeralPublicKey; 23 | 24 | /** @var integer */ 25 | public $maximumTimeout; 26 | 27 | /** @var string */ 28 | public $referenceNumber; 29 | 30 | /** @var string */ 31 | public $sdkTransReference; 32 | } -------------------------------------------------------------------------------- /src/Gateways/BillPay/Responses/SecurePayResponse.php: -------------------------------------------------------------------------------- 1 | setPaymentIdentifier($this->response->getString("a:GUID")); 13 | $result->setIsSuccessful($this->response->getBool("a:isSuccessful")); 14 | $result->setResponseCode($this->response->getString("a:ResponseCode")); 15 | $result->setResponseMessage($this->getFirstResponseMessage($this->response)); 16 | 17 | return $result; 18 | } 19 | } -------------------------------------------------------------------------------- /src/Terminals/Entities/PromptData.php: -------------------------------------------------------------------------------- 1 | setIsSuccessful($this->response->getBool("a:isSuccessful")); 14 | $result->setResponseCode($this->response->getString("a:ResponseCode")); 15 | $result->setResponseMessage($this->getFirstResponseMessage($this->response)); 16 | $result->convenienceFee = $this->response->getFloat("a:ConvenienceFee"); 17 | 18 | return $result; 19 | } 20 | } -------------------------------------------------------------------------------- /src/Services/FileProcessingService.php: -------------------------------------------------------------------------------- 1 | execute(); 15 | } 16 | 17 | public static function getDetails(string $resourceId) : FileProcessor 18 | { 19 | return (new FileProcessingBuilder(FileProcessingActionType::GET_DETAILS)) 20 | ->withResourceId($resourceId) 21 | ->execute(); 22 | } 23 | } -------------------------------------------------------------------------------- /src/Entities/FraudManagementResponse.php: -------------------------------------------------------------------------------- 1 | 32 | */ 33 | public $links; 34 | } -------------------------------------------------------------------------------- /examples/gp-api/google-pay/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Global Payments Google Pay with GP-API example 6 | 7 | 8 | 11 | 12 | 13 |
14 |

In order to process payments via Google Pay, please switch to HTTPS.

15 |
16 | 17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Entities/Enums/CardHolderAuthenticationCapability.php: -------------------------------------------------------------------------------- 1 | {$val}) === false) { 20 | $message .= $this->{$val}; 21 | } 22 | $message .= chr(ControlCodes::US); 23 | } 24 | return rtrim($message, chr(ControlCodes::US)); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Terminals/Genius/Entities/Enums/MitcRequestType.php: -------------------------------------------------------------------------------- 1 | {$val}) === false) { 20 | $message .= $this->{$val}; 21 | } 22 | $message .= chr(ControlCodes::US); 23 | } 24 | return rtrim($message, chr(ControlCodes::US)); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Entities/PayFac/DeviceDetails.php: -------------------------------------------------------------------------------- 1 | attributes = new DeviceAttributeInfo(); 18 | } 19 | 20 | /** 21 | * @param DeviceDetails $value 22 | * 23 | * @return void 24 | */ 25 | public function append($value) : void 26 | { 27 | if (!$value instanceof DeviceDetails) { 28 | throw new ArgumentException("Invalid argument type"); 29 | } 30 | parent::append($value); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Entities/CustomWebProxy.php: -------------------------------------------------------------------------------- 1 | uri = $uri; 16 | $this->username = $username; 17 | $this->password = $password; 18 | } 19 | 20 | public function __get($property) 21 | { 22 | if (property_exists($this, $property)) { 23 | return $this->{$property}; 24 | } 25 | } 26 | 27 | public function getProxy($destination) 28 | { 29 | return $destination; 30 | } 31 | 32 | public function isBypassed($host) 33 | { 34 | return false; 35 | } 36 | } -------------------------------------------------------------------------------- /src/Entities/Product.php: -------------------------------------------------------------------------------- 1 | readToCode(ControlCodes::FS); 17 | //Split using ControlCodes::US 18 | $response = preg_split('/[\x1F;]/', $responseString); 19 | try { 20 | $this->clerkId = isset($response[0]) ? $response[0] : ''; 21 | $this->shiftId = isset($response[1]) ? $response[1] : ''; 22 | } catch (\Exception $e) { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Entities/BrowserData.php: -------------------------------------------------------------------------------- 1 | mapLocalReportResponse($messageReader); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Entities/PayFac/SingleSignOnData.php: -------------------------------------------------------------------------------- 1 | deviceResponseCode == '000000') { 23 | $this->safDeletedCount = (int) $messageReader->readToCode(ControlCodes::FS); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Terminals/PAX/SubGroups/AvsResponse.php: -------------------------------------------------------------------------------- 1 | readToCode(ControlCodes::FS); 17 | //Split using ControlCodes::US 18 | $response = preg_split('/[\x1F;]/', $responseString); 19 | try { 20 | $this->avsResponseCode = isset($response[0]) ? $response[0] : ''; 21 | $this->avsResponseMessage = isset($response[1]) ? $response[1] : ''; 22 | } catch (\Exception $e) { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Entities/Enums/MerchantInitiatedRequestType.php: -------------------------------------------------------------------------------- 1 | significantOwnerData = new OwnersData(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Terminals/HPA/Entities/LineItem.php: -------------------------------------------------------------------------------- 1 | {$val}) === false) { 22 | $message .= $this->{$val}; 23 | } 24 | $message .= chr(ControlCodes::US); 25 | } 26 | return rtrim($message, chr(ControlCodes::US)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Terminals/Enums/DeviceType.php: -------------------------------------------------------------------------------- 1 | mandatoryParams = $params; 12 | } 13 | 14 | public function getMandatoryParams() 15 | { 16 | return $this->mandatoryParams; 17 | } 18 | 19 | public function validate($request) 20 | { 21 | $missingParams = ""; 22 | foreach ($this->getMandatoryParams() as $param) { 23 | if (strpos(json_encode($request), $param) === false) { 24 | $missingParams .= $param . ', '; 25 | } 26 | } 27 | if (!empty($missingParams)) { 28 | $missingParams = rtrim($missingParams, ', '); 29 | return $missingParams; 30 | } 31 | 32 | return true; 33 | } 34 | } -------------------------------------------------------------------------------- /src/Entities/AdditionalTaxDetails.php: -------------------------------------------------------------------------------- 1 | taxAmount = $taxAmount; 37 | $this->taxCategory = $taxCategory; 38 | $this->taxRate = $taxRate; 39 | $this->taxType = $taxType; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Entities/Reporting/StoredPaymentMethodSummary.php: -------------------------------------------------------------------------------- 1 | createElement("supplementarydata"); 10 | foreach ($builder->supplementaryData as $key => $items) { 11 | $item = $xml->createElement("item"); 12 | $item->setAttribute('type', $key); 13 | if (!is_array($items)) { 14 | $items = explode(' ', $items); 15 | } 16 | for ($i = 1; $i <= count($items); $i++) { 17 | $item->appendChild($xml->createElement('field' . sprintf("%02d", $i), $items[$i - 1])); 18 | } 19 | $supplementaryData->appendChild($item); 20 | } 21 | $request->appendChild($supplementaryData); 22 | 23 | } 24 | } --------------------------------------------------------------------------------