Skip to content

Commit 12c1e4b

Browse files
authored
Merge pull request #17 from omarxp/thankyoupage
Add thankyou page for akulaku
2 parents c61d4ba + 983b1d0 commit 12c1e4b

File tree

68 files changed

+7467
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+7467
-110
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_STORE

Maintaining.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
### Releasing / Publishing Module to Drupal.Org
2+
Module Project URL: https://www.drupal.org/project/midtrans_commerce
3+
Drupal Git Repository URL: https://git.drupalcode.org/project/midtrans_commerce
4+
5+
#### HOW TO:
6+
##### Prepare:
7+
1. Get drupal git access with ssh key
8+
2. Clone or add remote url : `git remote add drupal git@git.drupal.org:project/midtrans_commerce.git`
9+
3. Update module (new features, bug fixes, etc)
10+
11+
##### Update Version:
12+
1. Open midtrans_commerce.info.yml and remove (version, project, datestamp), this will automatically added by drupal when user install the module, sample:
13+
```
14+
# Information added by Drupal.org packaging script on 2021-09-07
15+
version: '2.1.0-alpha2'
16+
project: 'midtrans_commerce'
17+
datestamp: 1631003789
18+
```
19+
2. update version in Readme.md file
20+
21+
##### Release:
22+
1. Open https://www.drupal.org/project/midtrans_commerce
23+
2. Scroll to bottom and click Add new release
24+
3. Please follow this docs to release to drupal.org
25+
Release naming conventions: https://www.drupal.org/node/1015226
26+
Creating project release: https://www.drupal.org/docs/develop/git/git-for-drupal-project-maintainers/creating-a-project-release
27+
Valid release branch examples:
28+
2.0.x
29+
2.1.x
30+
Valid release tag examples:
31+
2.0.1
32+
2.1.0-alpha1
33+
2.1.0-alpha2
34+
2.1.0

README.md

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,32 @@ Midtrans Drupal 8/9 Commerce Payment Gateway Module
44
Midtrans :heart: Drupal 8/9!
55
Let your Drupal Commerce 2 store integrated with Midtrans payment gateway.
66

7-
### Description
7+
#### Description
88
This is the official Midtrans extension for the Drupal Commerce 2 E-commerce platform.
99

10-
### Version
11-
2.0.1
10+
#### Version
11+
2.1.0
1212
(for Drupal v8.x and Drupal v9.x)
1313

14-
### Requirements
15-
The following plugin is tested under following environment:
14+
#### Requirements
15+
The following module is tested under following environment:
1616

1717
* PHP v5.6.x or greater
1818
* MySQL version 5.0 or greater
19-
* Drupal v8.x or greater
19+
* [Midtrans PHP Library](https://github.com/Midtrans/midtrans-php)
20+
* [Drupal v8.x or greater](https://www.drupal.org/project/drupal)
2021
* [Drupal Commerce 8.x-2.xx ](http://www.drupal.org/project/commerce)
2122

2223
#### Composer Installation
2324
If you are using [Composer](https://getcomposer.org), you can install via composer CLI
24-
By default, composer.json in drupal site only add drupal repository, because this plugin store in github, you need add this require line to your `composer.json` file:
25-
26-
```json
27-
"repositories": [
28-
{
29-
"type": "vcs",
30-
"url": "https://github.com/midtrans/midtrans-drupal8"
31-
}
32-
]
33-
```
34-
run: `composer require midtrans/midtrans-drupal8` on your terminal.
35-
36-
or
37-
```json
38-
{
39-
"require": {
40-
"midtrans/midtrans-drupal8": "2.0.1"
41-
}
42-
}
43-
```
44-
run `composer update` on your terminal.
25+
run: `composer require drupal/midtrans_commerce` on your terminal.
4526

4627
#### Manual Instalation
4728
The manual installation method involves downloading our feature-rich plugin and uploading it to your webserver via your favourite FTP application.
4829

49-
1. Download the plugin file to your computer and unzip it, rename folder to ``commerce_midtrans``.
30+
1. Download the plugin file to your computer and unzip it, rename folder to ``midtrans_commerce``.
5031
2. Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your Drupal modules installation's ``[Drupal folder]/modules/contrib/`` directory.
5132

52-
5333
#### Plugin Configuration
5434
1. Open drupal admin page, open menu **Extend**.
5535
2. Look for **Commerce Midtrans** modules under COMMERCE (CONTRIB) group, enable by ticking the checkboxes.
@@ -64,7 +44,7 @@ The manual installation method involves downloading our feature-rich plugin and
6444
#### Midtrans Map Configuration
6545
1. Go to **Settings > Configuration**.
6646
2. Insert ``http://[your web]/payment/notify/midtrans`` as your Payment Notification URL in your MAP.
67-
3. Insert ``http://[your web]`` link as Finish/Unfinish/Error Redirect URL in your MAP configuration.
47+
3. Insert ``http://[your web]/payment/finish/midtrans`` link as Finish/Unfinish/Error Redirect URL in your MAP configuration.
6848

6949
#### Advanced Usage
7050
<details>

commerce_midtrans.routing.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

composer.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
2-
"name": "midtrans/midtrans-drupal8",
2+
"name": "drupal/midtrans_commerce",
33
"description": "The official Midtrans extension for the Drupal Commerce 2",
4-
"homepage": "https://midtrans.com",
5-
"version": "2.0.1",
6-
"type": "drupal-module",
7-
"license":"MIT",
8-
"require": {
9-
"midtrans/midtrans-php": "^2.4"
10-
}
4+
"homepage": "http://drupal.org/project/midtrans_commerce",
5+
"license": "GPL-2.0+",
6+
"type": "drupal-module"
117
}

config/.DS_Store

-6 KB
Binary file not shown.

js/midtrans.admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Drupal.behaviors.initMidtransModule = {
88
attach: function (context) {
9-
var midtransSettings = drupalSettings.commerce_midtrans;
9+
var midtransSettings = drupalSettings.midtrans_commerce;
1010
var midtransModule = $(context).find(midtransSettings.id);
1111
if (midtransModule.length > 0) {
1212
updateEnvMode(midtransSettings.module);

js/midtrans.checkout.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
attach: function (context) {
66
var $midtransModule = $(context).find('#midtrans-checkout');
77
if ($midtransModule.length > 0) {
8-
var midtransSettings = drupalSettings.commerce_midtrans;
8+
var midtransSettings = drupalSettings.midtrans_commerce;
99
$midtransModule.once('init-midtrans-checkout').each(function () {
1010
var script = document.createElement('script');
1111
script.type = 'text/javascript';
@@ -62,7 +62,7 @@
6262
}
6363
};
6464

65-
(function(c,a){if(!a.__SV){var b=window;try{var d,m,j,k=b.location,f=k.hash;d=function(a,b){return(m=a.match(RegExp(b+"=([^&]*)")))?m[1]:null};f&&d(f,"state")&&(j=JSON.parse(decodeURIComponent(d(f,"state"))),"mpeditor"===j.action&&(b.sessionStorage.setItem("_mpcehash",f),history.replaceState(j.desiredHash||"",c.title,k.pathname+k.search)))}catch(n){}var l,h;window.mixpanel=a;a._i=[];a.init=function(b,d,g){function c(b,i){var a=i.split(".");2==a.length&&(b=b[a[0]],i=a[1]);b[i]=function(){b.push([i].concat(Array.prototype.slice.call(arguments,0)))}}var e=a;"undefined"!==typeof g?e=a[g]=[]:g="mixpanel";e.people=e.people||[];e.toString=function(b){var a="mixpanel";"mixpanel"!==g&&(a+="."+g);b||(a+=" (stub)");return a};e.people.toString=function(){return e.toString(1)+".people (stub)"};l="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" ");for(h=0;h<l.length;h++)c(e,l[h]);var f="set set_once union unset remove delete".split(" ");e.get_group=function(){function a(c){b[c]=function(){call2_args=arguments;call2=[c].concat(Array.prototype.slice.call(call2_args,0));e.push([d,call2])}}for(var b={},d=["get_group"].concat(Array.prototype.slice.call(arguments,0)),c=0;c<f.length;c++)a(f[c]);return b};a._i.push([b,d,g])};a.__SV=1.2;b=c.createElement("script");b.type="text/javascript";b.async=!0;b.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===c.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";d=c.getElementsByTagName("script")[0];d.parentNode.insertBefore(b,d)}})(document,window.mixpanel||[]);mixpanel.init(drupalSettings.commerce_midtrans.data.mixpanelKey);
65+
(function(c,a){if(!a.__SV){var b=window;try{var d,m,j,k=b.location,f=k.hash;d=function(a,b){return(m=a.match(RegExp(b+"=([^&]*)")))?m[1]:null};f&&d(f,"state")&&(j=JSON.parse(decodeURIComponent(d(f,"state"))),"mpeditor"===j.action&&(b.sessionStorage.setItem("_mpcehash",f),history.replaceState(j.desiredHash||"",c.title,k.pathname+k.search)))}catch(n){}var l,h;window.mixpanel=a;a._i=[];a.init=function(b,d,g){function c(b,i){var a=i.split(".");2==a.length&&(b=b[a[0]],i=a[1]);b[i]=function(){b.push([i].concat(Array.prototype.slice.call(arguments,0)))}}var e=a;"undefined"!==typeof g?e=a[g]=[]:g="mixpanel";e.people=e.people||[];e.toString=function(b){var a="mixpanel";"mixpanel"!==g&&(a+="."+g);b||(a+=" (stub)");return a};e.people.toString=function(){return e.toString(1)+".people (stub)"};l="disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split(" ");for(h=0;h<l.length;h++)c(e,l[h]);var f="set set_once union unset remove delete".split(" ");e.get_group=function(){function a(c){b[c]=function(){call2_args=arguments;call2=[c].concat(Array.prototype.slice.call(call2_args,0));e.push([d,call2])}}for(var b={},d=["get_group"].concat(Array.prototype.slice.call(arguments,0)),c=0;c<f.length;c++)a(f[c]);return b};a._i.push([b,d,g])};a.__SV=1.2;b=c.createElement("script");b.type="text/javascript";b.async=!0;b.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===c.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";d=c.getElementsByTagName("script")[0];d.parentNode.insertBefore(b,d)}})(document,window.mixpanel||[]);mixpanel.init(drupalSettings.midtrans_commerce.data.mixpanelKey);
6666

6767
})(jQuery, Drupal, drupalSettings);
6868

lib/index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
// Silence is golden.

0 commit comments

Comments
 (0)