Skip to content

Commit

Permalink
1.0.4
Browse files Browse the repository at this point in the history
* Проект добавлен в maven-репозиторий на github
* Добавлено поле `customFields` в p2p-платежах (`PaymentForm`)
  • Loading branch information
osk115 authored Jan 23, 2023
1 parent 770f8ef commit e58e314
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 3 deletions.
63 changes: 60 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ru.osk.qiwi4j</groupId>
<artifactId>Qiwi4J</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>

<name>Qiwi4J</name>
<description>The unofficial SDK for the Qiwi payments written on Java</description>
Expand All @@ -18,6 +18,14 @@
</license>
</licenses>

<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>

<properties>
<!-- Building -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -30,6 +38,8 @@
<!-- Additional libs versions -->
<jetbrains.annotations.version>23.0.0</jetbrains.annotations.version>
<lombok.version>1.18.24</lombok.version>

<github.global.server>github</github.global.server>
</properties>

<dependencies>
Expand Down Expand Up @@ -66,7 +76,6 @@

<build>
<plugins>

<!-- Maven compiler plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -78,6 +87,53 @@
</configuration>
</plugin>

<!-- Maven deploy plugin -->
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>

<!-- Maven site plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>

<!-- Maven project info reports plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.0.0</version>
</plugin>

<!-- Site maven plugin -->
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<configuration>
<message>Maven artifacts for ${project.version}</message> <!-- git commit message -->
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
<branch>refs/heads/mvn-repo</branch> <!-- remote branch name -->
<includes><include>**/*</include></includes>
<repositoryName>Qiwi4J</repositoryName> <!-- github repo name -->
<repositoryOwner>osk115</repositoryOwner> <!-- organization or user name -->
</configuration>
<executions> <!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>

<!-- Maven shade plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -88,7 +144,8 @@
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>full</shadedClassifierName>
<finalName>qiwi4j-${project.version}-full</finalName>
<finalName>Qiwi4J-${project.version}-full</finalName>
<outputFile>${project.build.directory}\Qiwi4J-${project.version}-full.jar</outputFile>
<filters>
<filter>
<artifact>*:*</artifact>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/ru/osk/qiwi4j/payment/PaymentForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class PaymentForm {
String account;
String comment;
String successUrl;
String customFields;

public String createUrl(String publicKey) throws IOException {

Expand All @@ -39,6 +40,7 @@ public String createUrl(String publicKey) throws IOException {
if (email != null) urlBuilder.addQueryParameter("email", email);
if (comment != null) urlBuilder.addQueryParameter("comment", comment);
if (successUrl != null) urlBuilder.addQueryParameter("successUrl", successUrl);
if (customFields != null) urlBuilder.addQueryParameter("customFields", customFields);

return urlBuilder.build().url().toString();

Expand Down

0 comments on commit e58e314

Please sign in to comment.