GithubHelp home page GithubHelp logo

iyzipay-java's People

Contributors

alicanakkus avatar aripddev avatar aydogmusb avatar caglarp avatar canpekdemir avatar dependabot[bot] avatar erdemdmr avatar gulcabuk avatar hakanas avatar hakanoklay avatar iyzico-ci avatar kadriyedogan avatar kahramani avatar kurttaylan avatar kurtulussahin avatar mersancengiz avatar mustafacantekir avatar nurettinbakkal avatar okanbisgin avatar onur1993 avatar onurcankarabulut avatar ramazangirgin avatar recaifurkan avatar ryumer avatar semihhakkioglu avatar shuetisha avatar sotuzun avatar umit avatar yildirimismail avatar yyenigun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iyzipay-java's Issues

Readme points to dependency that does not work

In the README of the current release version (v2.0.113) there is a reference to an incorrect maven dependency

<dependency>
  <groupId>com.iyzipay</groupId>
  <artifactId>iyzipay-java</artifactId>
  <version>2.0.113</version>
</dependency>

The latest version on mvnrepository is still v2.0.84. Same for the maven central reference in the README of the current release version.

javadoc generation fails with JDK 11+

Problem

The following error occurs during JavaDoc generation with JDK 11+.

Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar (attach-javadocs) on project iyzipay-java: MavenReportException: Error while generating Javadoc:
Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in http://docs.oracle.com/javase/6/docs/api/ are in the unnamed module.

Solution

It looks like an OpenJDK bug. Check this issue. The solution is adding the following configuration as suggested in the issue.

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
  <source>8</source>
</configuration>
 ...
</plugin>

BasicPayment.create command triggers an error in Android Java.

Exact error is: Caused by: java.lang.NoSuchMethodError: No static method encodeBase64String([B)Ljava/lang/String; in class Lorg/apache/commons/codec/binary/Base64; or its super classes (declaration of 'org.apache.commons.codec.binary.Base64' appears in /system/framework/org.apache.http.legacy.boot.jar)

I guess it's necessary to use android.util.Base64 library instead of Apache Base64. Do you have a working version of java codes provided for Android exactly? Or am I doing something wrong?

java.xml.bind module does no longer exist with Java 11. FileBase64Encoder has reference!

Edit:

Thanks to the @kuscan for his suggestion. The problem can be removed by introducing "javax.xml.bind:jaxb-api" dependency so that the source code will not need to be modified.

Problem:

java.xml.bind module does no longer exists for Java 11+.
However, com.iyzipay.FileBase64Encoder class has a reference to this module.
Since Java 1.7+ is supported in this repository, that reference causes a compilation problem for Java 11+.

See Java 11 Release Notes. Search for ''JAXB".

Solution:

Suggestion 1:

java.util.Base64 class was introduced with Java 1.8. It is a self-contained class. Its OpenJDK implementation may be directly copied into the repository since we cannot refer to this class in Java 1.7.~~

Suggestion 2:

Apache Common Codec API lets such a conversion. A new dependency may be introduced to overcome the problem.

Suggestion 3: (@kuscan )

By introducing dependency to javax.xml.bind module and using it's JAXP API. Requires no modification on the source code.

Resolution:

@yyenigun which approach would be better or do you have a better suggestion? I will open a PR once we determine the approach. Thanks.

notificationUrl

Could you add notificationUrl parameter to the relevant requests please?

CheckoutFormInitialize.create Returns Invalid Signature (geçersiz imza)

I'm getting this error when initializing CheckoutForm using the method CheckoutFormInitialize.create

status=failure
errorCode=1000
errorMessage=Invalid signature

The error appears when running under windows only, but it works fine on Linux (Ubuntu).
I've tried on different machines, different Java versions, different servers (Tomcat and Wildfly) but got the same error, it only works on Linux.

The same code worked on windows but using junit test.

Are there any contribute way

We are currently using iyzipay java library and we would like to help improve usage. I could not to any contact address for contribution that's why I'm wrote on here. Thank you

Upgrade subscription ilgili datayı içermiyor

English Below,

Selamlar,

Iyzicoya python üzerinden abonelik yükseltmesi istek attığımızda aşağıdaki formatta cevap alıyoruz.

{ "status": "success", "systemTime": 1678446184680, "data": { "referenceCode": "abcd", "parentReferenceCode": "abcd", "pricingPlanReferenceCode": "abcd", "customerReferenceCode": "abcd", "subscriptionStatus": "ACTIVE", "trialDays": 0, "createdDate": 1678446184629, "startDate": 1678446184623 } }

bu dataya iyzipay-java'daki SubscriptionOperation.upgrade metodundan gelen cevap ile erişemiyoruz. data fieldına erişim mi istenmiyor? source kodunuzu incelediğimde dataya erişmek için bir method eklememişsiniz ama o zaman fieldda neden var?
Aynı durum SubscriptionSearch'te de geçerli. Kullanıdığım sürüm 2.0.115.

İyi çalışmalar dilerim.


Hi,

We achieve the response below when sending request to Iyzico via python for subscription upgrade.

{ "status": "success", "systemTime": 1678446184680, "data": { "referenceCode": "abcd", "parentReferenceCode": "abcd", "pricingPlanReferenceCode": "abcd", "customerReferenceCode": "abcd", "subscriptionStatus": "ACTIVE", "trialDays": 0, "createdDate": 1678446184629, "startDate": 1678446184623 } }

However, we can not access this data from response of SubscriptionOperation.upgrade method. Is data field hidden? If yes, why does data field exist? This problem also occurs when using SubscriptionSearch. Used version is 2.0.115.

Good day.

Invalid signature using `commons-lang3:3.11`

Context

We are using:

  • JDK 14
  • com.iyzipay:iyzipay-java:2.0.69

Case

We updated our org.apache.commons:commons-lang3 from 3.10 to 3.11 and now are facing:

status=failure
errorCode=1000
errorMessage=Invalid signature

[Release 2.0.85] "pom.xml" Dependency Problem

After updating dependency as 2.0.85, pom.xml throws an error, which is Missing artifact com.iyzipay:iyzipay-java:jar:2.0.85. After changing version to 2.0.84 everything works fine.

Screenshot:
error

Unable to use a proxy

Hello,

I found no way to tell this api to use a proxy to reach iyzico servers.

I would like to be able to provide the proxy settings (host, port , username, password) so that the HTTPClient might be able to open a connection using the proxy

About the error message: "Geçersiz imza"

Hello,

I am not sure if this error is about the integration department of Iyzico, but we needed to inform you about the issue.
The code below is just copied and pasted from the Iyzico Readme.

Indeed, it works quite well when we implement it as a JUnit test. We can even see the transaction on SandBox.
But when we try it as a Spring Boot @service method; the same method returns the aforementioned error message.

We try it on a Spring Boot project and on another pure Java project and got the same result.

Could you help us, please?

Kind regards.

 void testSamplePayment() {
        Options options = new Options();
        options.setApiKey("sandbox-xxxx");
        options.setSecretKey("sandbox-xxxx");
        options.setBaseUrl("https://sandbox-api.iyzipay.com");

        CreatePaymentRequest request = new CreatePaymentRequest();
        request.setLocale(Locale.TR.getValue());
        request.setConversationId("123456789");
        request.setPrice(new BigDecimal("1"));
        request.setPaidPrice(new BigDecimal("100"));
        request.setCurrency(Currency.TRY.name());
        request.setInstallment(1);
        request.setBasketId("B67832");
        request.setPaymentChannel(PaymentChannel.WEB.name());
        request.setPaymentGroup(PaymentGroup.PRODUCT.name());

        PaymentCard paymentCard = new PaymentCard();
        paymentCard.setCardHolderName("John Doe");
        paymentCard.setCardNumber("5528790000000008");
        paymentCard.setExpireMonth("12");
        paymentCard.setExpireYear("2030");
        paymentCard.setCvc("123");
        paymentCard.setRegisterCard(0);
        request.setPaymentCard(paymentCard);

        Buyer buyer = new Buyer();
        buyer.setId("BY789");
        buyer.setName("John");
        buyer.setSurname("Doe");
        buyer.setGsmNumber("+905350000000");
        buyer.setEmail("[email protected]");
        buyer.setIdentityNumber("74300864791");
        buyer.setLastLoginDate("2015-10-05 12:43:35");
        buyer.setRegistrationDate("2013-04-21 15:12:09");
        buyer.setRegistrationAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
        buyer.setIp("85.34.78.112");
        buyer.setCity("Istanbul");
        buyer.setCountry("Turkey");
        buyer.setZipCode("34732");
        request.setBuyer(buyer);

        Address shippingAddress = new Address();
        shippingAddress.setContactName("Jane Doe");
        shippingAddress.setCity("Istanbul");
        shippingAddress.setCountry("Turkey");
        shippingAddress.setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
        shippingAddress.setZipCode("34742");
        request.setShippingAddress(shippingAddress);

        Address billingAddress = new Address();
        billingAddress.setContactName("Jane Doe");
        billingAddress.setCity("Istanbul");
        billingAddress.setCountry("Turkey");
        billingAddress.setAddress("Nidakule Göztepe, Merdivenköy Mah. Bora Sok. No:1");
        billingAddress.setZipCode("34742");
        request.setBillingAddress(billingAddress);

        List<BasketItem> basketItems = new ArrayList<BasketItem>();
        BasketItem firstBasketItem = new BasketItem();
        firstBasketItem.setId("BI101");
        firstBasketItem.setName("Binocular");
        firstBasketItem.setCategory1("Collectibles");
        firstBasketItem.setCategory2("Accessories");
        firstBasketItem.setItemType(BasketItemType.PHYSICAL.name());
        firstBasketItem.setPrice(new BigDecimal("0.3"));
        basketItems.add(firstBasketItem);

        BasketItem secondBasketItem = new BasketItem();
        secondBasketItem.setId("BI102");
        secondBasketItem.setName("Game code");
        secondBasketItem.setCategory1("Game");
        secondBasketItem.setCategory2("Online Game Items");
        secondBasketItem.setItemType(BasketItemType.VIRTUAL.name());
        secondBasketItem.setPrice(new BigDecimal("0.5"));
        basketItems.add(secondBasketItem);

        BasketItem thirdBasketItem = new BasketItem();
        thirdBasketItem.setId("BI103");
        thirdBasketItem.setName("Usb");
        thirdBasketItem.setCategory1("Electronics");
        thirdBasketItem.setCategory2("Usb / Cable");
        thirdBasketItem.setItemType(BasketItemType.PHYSICAL.name());
        thirdBasketItem.setPrice(new BigDecimal("0.2"));
        basketItems.add(thirdBasketItem);
        request.setBasketItems(basketItems);

        Payment payment = Payment.create(request, options);
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.