hansputera / midtrans-node Goto Github PK
View Code? Open in Web Editor NEWUnOfficial Midtrans Payment API Client for NodeJS | https://midtrans.com
Home Page: https://midtrans.com
UnOfficial Midtrans Payment API Client for NodeJS | https://midtrans.com
Home Page: https://midtrans.com
saya mengalamai error penggunaan library ini dengan error seperti di bawah ini
Error: Module not found: Error: Can't resolve 'crypto' in 'D:\ionic\latihan1\node_modules\hanif-midtrans-node\dist\Util'
berikut kode app.module.ts saya
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { MidtransNode } from 'hanif-midtrans-node';
@NgModule({
declarations: [AppComponent],
imports: [ BrowserModule, IonicModule.forRoot(), AppRoutingModule],
providers: [MidtransNode, { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
bootstrap: [AppComponent],
})
export class AppModule {}
dan seperti ini di halaman midtransya
import { Component, OnInit } from '@angular/core';
import { MidtransNode } from 'hanif-midtrans-node';
@component({
selector: 'app-midtrans-npm',
templateUrl: './midtrans-npm.page.html',
styleUrls: ['./midtrans-npm.page.scss'],
})
export class MidtransNPMPage implements OnInit {
constructor() { }
ngOnInit() {
}
bayar(){
const midtrans = new MidtransNode(false, 'servey key saya'); // sandbox mode
midtrans.createTransaction({
transaction_details: {
gross_amount: 20000, // IDR 20.000
order_id: 'midtrans-node',
},
}).then(console.log).catch(console.error);
}
}
midtrans Node Bayarmohon bantuannya, dimanakah salah peletakan kode saya
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.