Data bidang ada yang kosong
Arlchoose opened this issue · 5 comments
Kenapa ya paymentQR padahal udah validate pake validasi qr nya tapi selalu menampilkan output ada bidang kosong? Padahal validasi nya output nya udah bener, tapi pas pay nya selalu ada bidang kosong?
PaymentQR nya apakah emang harus tetep pake payStaticQR nya?
Kenapa ya paymentQR padahal udah validate pake validasi qr nya tapi selalu menampilkan output ada bidang kosong? Padahal validasi nya output nya udah bener, tapi pas pay nya selalu ada bidang kosong?
- cara valdiate seperti apa?
- kode saat melakukan pay seperti apa?
harusnya tidak ada masalah
PaymentQR sudah berhasil tapi malah ada masalah baru di saat paystaticQR. Berikut kode saya
$x = "00020101021126740025ID.CO.BANKNEOCOMMERCE.WWW011893600490594021483202120005900294830303UKE51550025ID.CO.BANKNEOCOMMERCE.WWW0215ID10232677143020303UKE52044812530336054065000005802ID5910LAGI PEDIA6013JAKARTA PUSAT6105102606233052230017546522692496957440703T0163047A7D";
$out = json_decode($LANNGOPAY->validateQrCode($x));
$j = $LANNGOPAY->payStaticQR($out,10,'080304');
print $j;
dan class nya seperti ini
public function payStaticQR($validateQRCode, $amount, $pin) {
$inquiry = $this->paymentQR($validateQRCode, $amount);
print $inquiry;
if (!$inquiry->success) {
return 'Error Inquiry';
}
$query = http_build_query([
'intent' => $inquiry->data->intent,
'merchant_id' => $inquiry->data->merchant_information->merchant_id,
]);
$paymentOptions = $this->request('GET', self::API_CUSTOMER.'/v1/customer/payment-options?', $query);
if (!$paymentOptions->success) {
return 'Error Payment Options';
}
$paymentOptionsToken = $paymentOptions->data->payment_options[0]->token;
return $this->request('PATCH', str_replace('{{PAYMENT_ID}}', $inquiry->data->payment_id, self::API_CUSTOMER.'/v3/payments/{{PAYMENT_ID}}/capture'), [
'additional_data' => $validateQRCode->data->additional_data,
'applied_promo_code' => [
'NO_PROMO_APPLIED'
],
'checksum' => json_decode($validateQRCode->data->metadata->checksum),
'metadata' => $validateQRCode->data->metadata,
'order_signature' => $validateQRCode->data->order_signature,
'payment_instructions' => [
[
'amount' => [
'currency' => 'IDR',
'display_value' => '',
'value' => $amount
],
'token' => $paymentOptionsToken
]
]
], [
'Pin: ' . $pin,
'X-User-Locale: id_ID'
]);
}
Dan malah error inquiry
{ "data": { "additional_data": { "merchant_order_id": "", "merchant_information": { "name": "Artajasa Pilot", "address": "Jakarta Selatan", "location": "", "city": "", "postal_code": "", "merchant_id": "G294014597", "x_ref_id": "6c75a094-eca7-4257-bfbd-70148ea92b51", "brand_id": "artajasa", "tags": "enterprise,gopay_merchants_all_tag,gopay_offline_merchant,promo_voucher_qrhunt_pakuwon_gro,shuffle_telkomsel_40k,swadaya_merchant,swadaya_pillar.maintenance_oil" } }, "amount": { "currency": "IDR", "value": 10 }, "merchant_order_id": "", "payment_id": "0220240216034127qRupsIrE9wID", "description": "", "created_at": "2024-02-16T03:41:27.839232Z", "merchant_information": { "name": "Artajasa Pilot", "address": "Jakarta Selatan", "location": "", "city": "", "postal_code": "", "merchant_id": "G294014597", "x_ref_id": "6c75a094-eca7-4257-bfbd-70148ea92b51", "brand_id": "artajasa", "tags": "enterprise,gopay_merchants_all_tag,gopay_offline_merchant,promo_voucher_qrhunt_pakuwon_gro,shuffle_telkomsel_40k,swadaya_merchant,swadaya_pillar.maintenance_oil" }, "payment_intent": "DYNAMIC_QR_OFF_US", "intent": "DYNAMIC_QR_OFF_US", "status": "CREATED" }, "success": true }Error Inquiry
cek issue ini