Closed g00m00nry0ng closed 3 years ago
Sepertinya proses getQrid-nya ga mulus kalau langsung transfer, mungkin script saya kurang pas, next jadinya saya coba 2 tahap
{ "success": false, "error": { "code": "310", "description": "Malformed data" }, "errors": [ { "code": "GoPay-310", "message": "Malformed data", "message_title": "Malformed data", "message_severity": "error" } ] }
ada masukan?
boleh tau kode eksekusinya ?
7 coba lihat ini kak, siapa tau problemnya sama
ok, bener Gan. problemnya di amount. setelah saya rubah $amount menjadi (int)$amount sudah fix sekarang. Thx ya
Scriptnya jadi sbb:
public function transferGopay($qr_id,$amount, $pin)
{
$this->pin = $pin;
$payload = array(
'amount' => array(
'currency' => 'IDR',
'value' => (int)$amount
),
'description' => 'nama pengirim',
'metadata' => array(
'post_visibility' => 'NO_SOCIAL',
'theme_id' => 'THEME_CLASSIC'
),
'payee' => array(
'id' => $qr_id,
'id_type' => 'GOPAY_QR_ID'
)
);
echo self::Request(self::API_CUSTOMER . '/v1/funds/transfer', $payload, true);
}
Kalau dapat response begini saat transferGopay kira-kira kenapa ya Gan?
{ "data": { "kyc_status": "REJECTED", "is_blocked": false, "qr_id": "9e4fa336-0280-4fa3-8c54-8c9c0280047a0", "connection_type": "FRIEND", "connection_status": "ACTIVE", "name": "A***", "phone_number": "+6285843211234" }, "success": true, "errors": [] }{ "success": false, "error": { "code": "303", "description": "Field cannot be blank" }, "errors": [ { "code": "GoPay-303", "message": "Field cannot be blank.", "message_title": "Field cannot be blank.", "message_severity": "error" } ] }