Skip to content

Commit

Permalink
Merge pull request #1 from manjav/main
Browse files Browse the repository at this point in the history
Complete purchse methods in unity
  • Loading branch information
mreram authored Aug 2, 2021
2 parents 726b6fc + e754627 commit f8e5b80
Show file tree
Hide file tree
Showing 82 changed files with 2,110 additions and 1,191 deletions.
63 changes: 0 additions & 63 deletions Assets/Poolakey/Demo/DemoSceneSettings.lighting

This file was deleted.

39 changes: 0 additions & 39 deletions Assets/Poolakey/Demo/PoolakeyExample.cs

This file was deleted.

Binary file removed Assets/Poolakey/Plugins/poolakeyunitybridge.aar
Binary file not shown.
24 changes: 0 additions & 24 deletions Assets/Poolakey/Scripts/Callbacks/ConnectionCallbackProxy.cs

This file was deleted.

24 changes: 0 additions & 24 deletions Assets/Poolakey/Scripts/Callbacks/PaymentCallbackProxy.cs

This file was deleted.

55 changes: 0 additions & 55 deletions Assets/Poolakey/Scripts/Payment.cs

This file was deleted.

18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# PoolakeyUnitySdk
<img src="https://github.com/manjav/PoolakeyUnitySdk/blob/main/images/Poolakey-unity.jpg?raw=true"/><br/>

[........... راهنمــــــای فـــــــارسی ..........](https://github.com/manjav/PoolakeyUnitySdk/blob/main/README_FA.md)


### Unity SDK for [Poolakey](https://github.com/cafebazaar/Poolakey) ( New Cafebazaar IAP ).<br/><br/>

Easy payment :

```c#
var connectionResult = await payment.Connect();
var purchaseResult = await payment.Purchase("productID");
var consumeResult = await payment.Consume(purchaseResult.data.purchaseToken);
```
<br/><br/>
## How to use?
For more information regarding the usage of Poolakey, please check out the [wiki](https://github.com/manjav/PoolakeyUnitySdk/wiki) page.
16 changes: 16 additions & 0 deletions README_FA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<img src="https://github.com/manjav/PoolakeyUnitySdk/blob/main/images/Poolakey-unity.jpg?raw=true"/><br/>

### [<center>........... English Readme ..........</center>](https://github.com/manjav/PoolakeyUnitySdk/blob/main/README.md)
<br/>

## <div dir="rtl">پولکی (کتابخانه جدید و ساده پرداخت درون‌برنامه کافه بازار)</div><br/>
<p dir="rtl">پیاده سازی بسیار آسان :</p>

```c#
var connectionResult = await payment.Connect();
var purchaseResult = await payment.Purchase("productID");
var consumeResult = await payment.Consume(purchaseResult.data.purchaseToken);
```
<br/><br/>

## [<center>پیاده سازی گام به گام کتابخانه</center>](https://github.com/manjav/PoolakeyUnitySdk/wiki/%DB%B1.-%D9%86%D8%B5%D8%A8-SDK)
10 changes: 10 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.iml
/app/production
.gradle
/local.properties
.idea
.DS_Store
/build
/captures
.externalNativeBuild
*.ks
71 changes: 71 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29
buildToolsVersion '29.0.2'

defaultConfig {
minSdkVersion 9
targetSdkVersion 29
versionCode 1
versionName "1.0"
}

compileOptions
{
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}


dependencies {
implementation "com.github.cafebazaar.Poolakey:poolakey:1.1.0-beta02"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

task deleteJar(type: Delete) {
delete 'Poolakey.jar'
}
task createJar(type: Copy) {
from('build/intermediates/packaged-classes/release/')
into('build')
include('classes.jar')
rename('classes.jar', 'Poolakey.jar')
}
task updateAAR(type: Copy) {
from('build/outputs/aar')
into('../unity/Assets/Poolakey/Plugins/')
include(project.name + '.aar')
}

project.tasks.whenTaskAdded { Task theTask ->
if (theTask.name == 'assembleRelease') {
theTask.dependsOn(updateAAR) // Compile the custom task after compiling apk
}
}
21 changes: 21 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
Binary file added android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Tue Jun 29 12:14:03 IRDT 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
Loading

0 comments on commit f8e5b80

Please sign in to comment.