Download the PHP package yay-photobooks/partner-sdk without Composer

On this page you can find all versions of the php package yay-photobooks/partner-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package partner-sdk

YAY Partner SDK (PHP)

Latest Version License PHP Version

A simple, type-safe PHP SDK for integrating with the YAY Photobook Partner API. Enable YAY to create beautiful photobooks for your customers.

Not using PHP?

We use a REST API that you can query with any language that supports HTTP requests.

The API specification is defined in openapi-partner-api.yaml (OpenAPI 3.1).

Features

Installation

Quick Start

1. Environment Setup

Set the variables as shown in the .envrc.example.

When you use direnv, its as simple as copying and modifiny .envrc.example

2. Create a Photobook Project

B2B preview-before-checkout (no address)

Partners can create a project before collecting the customer's postal address — the customer fills it in during checkout in YAY's own form. See examples/create-project-no-address.php.

Webhooks

When the status of a project changes, we send a POST request to your webhook URL. The SDK does not receive webhooks: handle them in your own application.

Setup: log in to the partner area and open /admin/webhooks (sandbox: /admin/webhooks). Add your URL there and copy the signing secret (whsec_...).

Request:

failedPhotos is only sent with TRANSMISSION_FAILED.

Verify the signature as defined by Standard Webhooks, for example with composer require standard-webhooks/standard-webhooks:

Rules:

See the openapi-partner-api.yaml (webhooks section).

Environment Configuration

Required Environment Variables

Variable Description Example
YAY_PARTNER_USERNAME Your partner API username your_partner_username
YAY_PARTNER_PASSWORD Your partner API password your_partner_password
YAY_PARTNER_USER_AGENT Your application identifier YourCompany/1.0
YAY_PARTNER_BASE_URL API base URL https://sandbox.yayphotobooks.com

API Base URLs

The .envrc file automatically sets YAY_PARTNER_BASE_URL based on your YAY_PARTNER_ENVIRONMENT setting.

Error Handling

The SDK follows RFC 7807 (Problem Details for HTTP APIs) for consistent error handling:

Common Error Codes

HTTP Status Error Type Description
400 validation_failed Invalid request data (missing fields, wrong format)
401 authentication_failed Invalid credentials
404 not_found Invalid endpoint
500 server_error Internal YAY error

API Reference

CreateProjectRequest

Customer

Address

Upload

Development

Setup Development Environment

Running Tests

Code Quality

Support

License

This SDK is open-source software licensed under the MIT License.


Made with ❤️ by YAY Photobooks


All versions of partner-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
symfony/http-client Version ^6.0|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yay-photobooks/partner-sdk contains the following files

Loading the files please wait ...